In this exercise you will add the project resources to the project and edit the Show
The ZIP archive contains two folders with files that you need to add to the project: 0 .
Note: If you are looking at the directory structure of the project, you need to copy the folders into the 3 folder.Figure 27. NetBeans menu in the Chrome browser tab
You can use the code completion in the editor to help you. Figure 28. Code completion in the editor
When you save your changes the page automatically reloads in the browser and the page should look similar to the following image. Figure 29. Reloaded page in in the Chrome browser tab
Press Ctrl-Space to use the code completion in the editor when you add the CSS rules. Figure 30. Code completion of CSS rules in the editor If you open the Browser DOM window you can see the current structure of the page. Figure 31. Browser DOM window showing DOM tree
The 6 style sheet is based on some of the CSS rules that are defined in the custom CSS style sheet in the jQuery "UI lightness" theme.You can open the 6 style sheet in the editor and modify the style sheet to add the CSS rules that you added in the previous step or create a new style sheet for the CSS rules.
jQuery works by connecting dynamically-applied JavaScript attributes and behaviors to elements of the DOM (Document Object Model). The jQuery instructions that are used in this example must be executed only after all of the elements of the DOM have been loaded by the browser. This is important because jQuery behaviors connect to elements of the DOM, and these elements must be available to jQuery in order to get the results we expect. jQuery takes care of this for us through its built-in 8 function, which follows the jQuery object, represented by 9.You can also use the following abbreviated version of this function. The instructions for jQuery take the form of a JavaScript method, with an optional object literal representing an array of parameters, and must be placed between the curly braces 0 inside the 8 function in order to execute only at the proper time, which is after the DOM has completely loaded.
This code will invoke the jQuery accordion widget script that is included in the jQuery UI library. The accordion script will modify the elements within the DOM object that is identified as 4 . In this code, 5 is a CSS selector connected to a unique DOM element that has an 6 attribute with the value 4. It is connected using typical JavaScript dot notation (‘.’) to the jQuery instruction that uses the 8 method to display this element.In the next step you will identify an element in the page as 4 .You also specified ‘autoHeight: false’ in the above snippet. This prevents the accordion widget from setting the height of each panel based on the highest content part contained within the markup. For more information, consult the accordion API documentation. The section of the
You can tidy up your code by right-clicking in the editor and choosing Format.
This element encloses the contents of the page (the four sets of tags and tags that you added earlier in the tutorial).You can add the selector to the element in the Edit CSS Rules dialog box. To open the Edit CSS Rules dialog box, right-click in thetag in the editor and choose Edit CSS Rules in the popup menu. Alternatively, if the insert cursor is in the tag in the editor you can click the Edit CSS Rules button () in the CSS Styles window (Window > Web > CSS Styles).Figure 32. CSS Styles windowIn the CSS Rules dialog box, select 6 as the Selector Type and type infolist as the Selector. Confirm that Apply Changes to the Element is selected.Figure 33. Edit CSS Rules dialog boxWhen you click OK in the dialog box a CSS rule for the 4 selector is automatically added to the Mary Adams
John Matthews
Sam Jackson
Jennifer Brooks
6 style sheet.
When you save your changes the page in the web browser reloads automatically. You can see that the layout of the page has changed and that the page now uses the CSS style rules that are defined in the 6 style sheet. One of the lists below theis open but the others are now collapsed. You can click anelement to expand the list.Figure 34. The final project loaded in the browser The jQuery accordion function now modifies all the page elements that are contained in the 4 DOM object. In the Navigator window you can see the structure of the HTML file and that the 8 element that is identified by 9 .Figure 35. Browser DOM window You can right-click on an element in the Navigator window and choose Go To Source to quickly navigate to the location of that element in the source file. In the Browser DOM window you can see the DOM elements in the page that is rendered in the browser and the JQuery styles that are applied to the elements. Figure 36. Browser DOM window When Inspect in NetBeans Mode is enabled in the browser, when you select an element in the browser window the element is highlighted in the Browser DOM window. Saving the Project as a Site TemplateYou can save your project as a site template that you can use as a template to create other HTML5 sites that are based on the project. The site template can include JavaScript libraries, CSS files, images and templates for HTML files. The IDE provides a wizard to help you select the files that you want to include in the site template.
If you expand the nodes in the tree in the dialog box you can see the files that will be included in the site template. Figure 37. Create Site Template dialog box You can see that the site template will include the When you click Finish the IDE will generate the site template as a 1 archive.When you want to create a project that is based on the site template you specify the location of the 1 archive in the Site Template panel of the New Project wizard.
HTML5 diawali dengan apa?Berikut ini penjelasan dari dokumen HTML5 di atas : o Sebuah dokumen HTML5 diawali dengan <!DOCTYPE HTML>. o Tanda seperti <html> disebut tag.
Apakah HTML dan HTML5 sama?HTML5 adalah perbaikan dari HTML. Versi ini diciptakan sebagai solusi untuk kebutuhan saat ini — salah satunya adalah dukungan untuk membuat website yang bersifat mobile-friendly. HTML5 mampu menangani error secara lebih baik dibanding HTML.
Apa yang dimaksud dengan HTML5 itu sendiri?HTML5 adalah sebuah bahasa markah untuk menstrukturkan dan menampilkan isi dari World Wide Web, sebuah teknologi inti dari Internet. HTML5 adalah revisi kelima dari HTML (yang pertama kali diciptakan pada tahun 1990 dan versi keempatnya, HTML4, pada tahun 1997) dan hingga bulan Juni 2011 masih dalam pengembangan.
Apa fungsi HTML5?Tujuan HTML5 adalah untuk mengikuti perkembangan teknologi informasi dan meningkatkan dukungan terhadap struktur bahasa yang digunakan dalam file multimedia modern. Tak berhenti di situ saja, tujuan HTML5 adalah meningkatkan pengalaman berinternet bagi pengembang dan pengguna.
|