Can You Recall What Attributes Are?
Can You Recall What Attributes Are?
Can you recall what attributes are? Where are they placed?
Attributes provide additional information about the tag and is placed on the start tag. Since container tags have start tag and the <body></body> tag is a container tag, it contains attributes
Structure of a Tag
<html>
<head> <title>Bliss Inc. </title> </head> <body bgcolor="red text="yellow">My first paragraph.</body> </html>
Indicates the background images of the web page background Ex.<body background = redflower.jpg>
bgcolor
Indicates the background Assigned name or the color of the web page hexadecimal value of the Ex.<body bgcolor =red> color Indicates the color of the Assigned name or the text in the web page hexadecimal value of the Ex.<body text=black> color
text
link
Indicates the color of the hyperlinks in the web page Ex.<body link=blue>
vlink
Indicates the color of the Assigned name or the visited hyperlinks in the web hexadecimal value of the page color Ex. <body vlink=#FF0000>
alink
Indicates the color of the Assigned name or the active hyperlinks (when hexadecimal value of the clicked) in the webpage color Ex. <body alink=#000000>
Headings
Heading are containers tags which format
text using pre defined values for size and color. There are 6 heading tags available. <h1> </h1> <h4> </h4> <h2> </h2> <h5> </h5> <h3> </h3> <h6> </h6> Extra lines are placed after headings when displayed on Web Browser.
Sample
Note: Use HTML headings for headings only. Dont use headings to make text BIG or bold. Search engine use headings to index the structure and content of web pages. skim
Heading Alignment
Attribute Table for <h1> </h1>
Attribute Name Definition Values
left right center justify
align
title
Indicates the text that appears when the mouse hovers over the heading
Ex. <h1 title=Hello there!> Put the mouse over me !!! </h1>
any text
<p> </p>
Aligning a paragraph
- used the paragraph tag pair <p align=left"> </p> <p align="right"> </p> <p align=center"> </p>
Note: Remember to close the container tag that you opened. You can type the open and close tags first before typing the contents in between the tags.
Sample Codes
Sample Output
Line Breaks
<br> tag creates a line break or new line
<br /> use this tag to have multiple line space
Note: You can use line breaks to create spaces in your web page.
align Size
height
Number of pixels
Width
Length
Indicates the width of the horizontal rule in pixels or percent of the width displayed by the web browser.
Ex. <hr width=300>
noshade
color
List
Presenting data in an enumerated format Types of List
Ordered List - numbered list Unordered List-bulleted list Definition List
Ordered List
This type of list where each item is numbered usually starting at 1 (but can be change using the start attribute)
Sample Codes
Note: By default the ordered list starts with number 1 with Arabic numerals like 1,2,3
Values
1, a, A, I, I
type
start
Unordered List
List that enumerates each item using bullet Ordered list uses the container tag
Sample Code
Ordered List
The ordered list has different types of numbering and can be specified by keying the specified value for the type attribute: 1 a A i I for regular numbering (1,2,3 etc) for lowercase alphabet (a,b,c,d etc) for uppercase alphabet (A, B, C, etc) for lowercase Roman Numeral (i, ii, ii, etc.) for uppercase Roman Numerals (I, II, III etc)
Unordered List
The unordered list has different types of bullet to be used and can be specified by keying the specified value for the type attribute: disc for round bullets
<ul type=disk>
<ul type=circle>
Values
disc circle square
type
Invisible Comments
To ignore some output, you may used comment. Can be used to explain complicated codes, note details when codes was edited and removed.
<! -->
Sample Code
Definition List
It is an effective tool for making your own definition of terms list or glossary. This type of list uses the container tag <dl> </dl> Unlike the previous list, the definition list uses the empty tags <dt> for the item itself and <dd> for the definition of the item.
Sample Code
Quoting Passages
You can place quotes in intended form and shrink it to be set apart from main paragraph by using the tag pair
<blockquote> </blockquote>
Performing Text
You can preformat text by using the Preformat Tag pair <pre> </pre> The result will be displayed according to your desired appearance.
Typography
Adding styles and effects Terms to be used:
<sup></sup>
<sub></sub> <em></em> <strong></strong> <big></big> <small></small>
size
Displays the text with a decrease in size
<sup></sup>
<sub></sub> <em></em> <strong></strong> <big></big> <small></small>
size
Displays the text with a decrease in size
<br>
<br> <br>
<FONT FACE=value" SIZE="value" COLOR="value"> </Font> <FONT FACE="ARIAL" SIZE="5" COLOR="GREEN"> This is Arial, Size 5 and Color Green</Font>
<pre>
Math Pilipino English PE NSTP Programming
</pre>