body and heading tags and their attributes
DESCRIPTION
Body and Heading Tags and their Attributes. Body Tag Attributes. Body. Headings. These are container tags which format text using pre-defined values for size and color. There are 6 heading tags and they are , , , , , - PowerPoint PPT PresentationTRANSCRIPT
Body and Heading Tags and their Attributes
Attribute Name
Definition Values
background Indicates the background image of the Web page. Ex. <body background=“redflower.jpg”>
Filename(path could be included)of the image file
bgcolor Indicates the background color of the Web page.Ex. <body bgcolor=“red”>
Assigned name or hexadecimal value of the color
text Indicates the color of the text in the Web page.Ex. <body text=“black”>
Assigned name or hexadecimal value of the color
link Indicates the color of the hyperlinks in the Web page.Ex. <body link=“blue”>
Assigned name or hexadecimal value of the color
vlink Indicates the color of the visited hyperlinks in the Web page.Ex. <body vlink=“#FF0000”>
Assigned name or hexadecimal value of the color
Body Tag Attributes
Attribute Name
Definition Values
alink Indicates the color of the active hyperlinks (when clicked) in the Web page.Ex. <body alink=“#000000”>
Assigned name or hexadecimal value of the color
class, id, style Used in Cascading Style Sheets or CSS
Body
Headings• These are container tags which format text using
pre-defined values for size and color. • There are 6 heading tags and they are
<h1></h1>, <h2></h2>, <h3></h3>, <h4></h4>, <h5></h5>, <h6></h6>
• Used for titles and headers• The biggest Heading is <h1> and the smallest is
<h6>• Note: Extra lines are placed after headings when displayed on
a Web browser.
Attribute Name
Definition Values
align Indicates the horizontal alignment of heading.Ex. <h1 align=“left”>This is left-aligned</h1>
Left, right, center, justify
title Indicates the text that appears when the mouse hovers over the heading.
Any text
class, id, style Used in Cascading Style Sheets or CSS
Heading Attributes
Heading Levels
Heading Levels
Heading Alignments
Heading Alignments
Activity 1List the attributes for the <body> tag.
1. Indicates the color of the active hyperlinks (when clicked) in the Web page.
2. Indicates the background color of the Web page.
3. Indicates the color of the hyperlinks in the Web page.
4. Indicates the color of the text in the Web page.
5. Indicates the background image of the Web page.
6. Indicates the color of the visited hyperlinks in the Web page.
Make the necessary corrections to the following HTML codes. Write correct on the answer sheet if the code is free from error.
Activity 2
1. <body></body> <body></body>
2. <body bground=“redflower.jpg”> <body background=“redflower.jpg”>
3. <body background color=“red”> <body bgcolor=“red”>
4. <body text=black> <body text=“black”>
5. <body link “blue”> <body link=“blue”>
6. body vlink=“#ff0000” <body vlink=“#ff0000”>
7. body alink=“#000000” <body alink=“#000000”>
8. <h1><h1/> <h1></h1>
9. <h1 align=“left”> <h1 align=“left”>
10. <h2></h2> <h2></h2>
Activity 3Put T if the statement is true and put F if the statement is false.
1. Background indicates the background color of the Web page.2. Attributes provide additional information about the tag.3. The text indicates the color of the text in the Web page.4. Headings are container tags which format text using pre-defined
value for size and color.5. The background color indicates the background image of the Web
page.6. Link indicates the color of the hyperlinks in the Web page.7. There are 6 heading tags used in making HTML.8. The align attribute indicates the vertical alignment of heading.9. Extra lines are placed after headings when displayed on a Web
browser.10. The vlink attribute indicates the color of the visited hyperlinks in the
Web page.