Documente Academic
Documente Profesional
Documente Cultură
For a refresher on how to extract the files, refer to the first lesson in the class. This is the reason
you were given this first assignment we use zip files a lot in this class.
Next type in a Title tag, just above the closing the </head> tag, as shown:
Adding Content to the HEAD of the Document Linking the CSS Page
The last thing to add to the </head> of this particular web page is the link to the CSS Page.
What is CSS? CSS stands for Cascading Style Sheet and is what gives the page its pizzazz its
flair. Its formatting. CSS was developed to help programmers so if you wanted all Level Header
1s to be orange, in a font of Corsiva and a font-size 24, instead of changing it on every single
page of a web site (which can be hundreds of pages for corporations), its changed in one file
that controls the formatting of all pages. This is called an External Style Sheet. There are
three types of Cascading Style Sheets, explained next. For now, add the following between the
<head> and </head> of your document :
This link to the stylesheet is an external style sheet and linking the page to the style sheet brings
in the formatting defined in that sheet to this page.
Take a few minutes and open the file: toystyle.css within the editor you are using and take a
look at the page elements that have been defined and formatted within this document
This page can be edited at this point, but theres no need to edit it for this assignment. Just to
understand it.
Note: Each of the above should be self-explanatory, with the possible exception of the h1, which
stands for Header, Level 1
1. Internal
a. Internal style sheets are added within the HEAD tags of an HTML page.
b. If the page is referencing both an Internal and an External style sheet, the Internal
style sheet will override the defined elements that it contains, and the External style
sheet settings will be applied to anything not overridden by the Internal style sheet.
c. Internal style sheets are sometimes referred to as Embedded style sheets.
2. External
a. External style sheets are separate files that end in .css
b. A link to the .css file is placed within the HEAD tag of the HTML page youre
formatting with the CSS file.
c. External style sheets will be covered in the project, not in this assignment; although
all style sheets share many properties so learning Internal will help you with learning
External and Inline style sheets.
3. Inline
a. Inline style sheets define one element on a page differently than other like
elements. This is used when you want one level heading to have something
different than all of the other like level headings, or when you wish to have one
Paragraph formatted differently than the other paragraphs
b. Inline formatting overrides the other two style sheets
The page you are creating was shown to you in Canvas. Here it is again, only this time shown
where the tables have been created.
Looking at the Cascading Style Sheet, you will see that without adding additional formatting to
this table, it will be 900 px wide, with a background thats white
Figure 1 :headertoys.jpg
Filename: headertoys.jpg
Width: 237 px
Height: 199 px
Content is added between the <td> and </td> tags of the page. These are the column (or cell,
and also known as the table data). So to add this image to the table, enter the following
between the first set of <td> and </td> tags:
2. In the first row, second cell (second column), we have the logo and the navigation bar:
This is added by adding the following to the second set of <td> </td> tags in the first row:
Notice that the menu images are not totally touching each other. Theres a tiny space between
the images. To get rid of these tiny spaces, add the following style to EACH of the <img> tags
comprising the navigation:
To add this table, place the following within the second row of the first table:
What do you type where the SECOND TABLE HERE is written? Here it is. Where indicated, add
the following table and content:
Testing Your Work in a Browser and Centering the Table on the Page
1. Notice that when you open the page in a browser, its almost right, but everything is not
center aligned. To center align the table, add the following to the toystyle.css file:
2. Finally, to apply this to both tables (which will center align the table on the page), apply the
center class to both tables on the page, by adding the class=center to each open <table>
tag, as shown:
3. Save and refresh in the browser. Your pages should now be working.
phone.jpg xylophone.jpg
2. Edit the content of the pulltoys.html page to add these images to the page in place of the
toys that are were there from the collectibles page. When you click Save, you will have two
working pages. This is done by:
a. Changing the content of both <H2> tags
b. Changing the image names from mrpotato.jpg and recordplayer.jpg to phone.jpg
and xylophone.jpg
c. Change the content of the alt= (alt attribute) for both images
d. Edit the text for the toy descriptions
e. Change the prices as you desire
3. Change the H1 from Collectibles to Pull Toys
2. Remember that while this looks like one graphic, its actually five separate graphics.
3. While all of the pages are in your project folder, only two have content: collectibles.html
and pulltoys.html
4. You need these two pages to link back and forth in a browser. To do this, edit the HTML to
link the collectibles_menu.gif image to the collectibles.html page and the
pulltoys_menu.gif image to the pulltoys.html page. To do this, anchor tags encase each
image. Anchor tags are <a> and </a>
The anchor tag has a hyperlink reference attribute, written as href=
So to link each image, the code is:
The line is really long, so to make it more readable within these instructions, I cut it off
(shortened the img tag in the picture) to show you the syntax for the anchor tag. Here is
what the section of code on the page looks like, without cutting it off (but its small):
This will create a file ending in .zip in the same location as your folder. Locate this file and
attach it to the submission box.