Post one or more of these questions in an area where students can read them and allow time for students to respond to the questions. Discuss the student answers these questions.
Discuss the idea of attributes. Attributes are information which alters the look of the page and when they are included within the opening body tag affect the entire document. Students have already been given an example of this through the code <body text=red>How would this attribute change things?</body>. Students should realize that this attribute sets the text to the color red. Using the word “red” is one way of defining color. Students should realize that two other ways exist; one being a hexadecimal code and the other being an RGB code. Explain that these methods will be discussed later in Module 3. At this time, students need to understand that colors can be identified by their word name, hexadecimal code or their RGB code.
Show students some of the Web sites which display colors with their color name, hexadecimal code, and RGB code.
Color may also be used in the background of a Web page. The attribute to define the background color is also placed in the opening body tag. An example of this code defining this attribute is <body bgcolor=”33ff33”>. Ask students to identify the color 33ff33 before displaying the page. Can they use one of the color charts to identify the hexadecimal color code?
Ask the students to attempt to write the code and attributes for the following: Black background and White text
Have them check their answers with the following: <body bgcolor=000000 text=#FFFFFF>
Discuss that text can also be altered by alignment. Alignment is how the text is oriented on the page. For example, text can be aligned in three ways on a Web page; left, right and centered. Text is automatically set to left alignment unless the designer changes this alignment.
Discuss that sometimes there is a need to separate text from other parts of the Web page. This can be done horizontally by using a horizontal rule (a horizontal line). To create a horizontal rule, the tag <hr> is used. To this tag, the attributes of width (how far the line extends across the page represented by a percent), size (thickness of the line represented by an integer) and color can be added. An example of a horizontal rule tag would look something like this <hr width=90% size=10 bcolor=#0000FF>. This tag would create a line which extends across 90 percent of the Web page and is 10 pixels thick. The color of the line will be blue.
Review concepts covered if needed with the students and discuss the practice activity.