In this exercise you will add the project resources to the project and edit the index.html file to add links to the resources and add some CSS rules. You will see how a few simple CSS selectors when combined with JavaScript can significantly change how a page is displayed in a browser.
The ZIP archive contains two folders with files that you need to add to the project: pix and
Mary Adams
John Matthews
Sam Jackson
Jennifer Brooks
Mary Adams
John Matthews
Sam Jackson
Jennifer Brooks
Mary Adams
John Matthews
Sam Jackson
Jennifer Brooks
Mary Adams
John Matthews
Sam Jackson
Jennifer Brooks
Mary Adams
John Matthews
Sam Jackson
Jennifer Brooks
Mary Adams
John Matthews
Sam Jackson
Jennifer Brooks
Mary Adams
John Matthews
Sam Jackson
Jennifer Brooks
Mary Adams
John Matthews
Sam Jackson
Jennifer Brooks
Mary Adams
John Matthews
Sam Jackson
Jennifer Brooks
Mary Adams
John Matthews
Sam Jackson
Jennifer Brooks
Mary Adams
John Matthews
Sam Jackson
Jennifer Brooks
Mary Adams
John Matthews
Sam Jackson
Jennifer Brooks
Mary Adams
John Matthews
Sam Jackson
Jennifer Brooks
Senior Technician
- phone: x9430
- office: 327 Bldg 2
- email: j.brooks@company.com
6 style sheet. One of the lists below the
is open but the others are now collapsed. You can click an
element 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 Template
You 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.
Right-click the project in the Projects window and choose Save as Template in the popup menu.
Type HTML5DemoSiteTemplate in the Name field and specify the location where you want to save the template.
Confirm that all the files are selected. Click Finish.
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 index.html file, the CSS style sheet, the images used in the project, though not the JavaScript libraries since Bower can be used by anyone using the template to manage the libraries. The site template can also include any configuration files and tests.
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.