15) Horizontal Rule Tag <HR>
Horizontal rules are used to visually break up sections of a document. The <HR> tag creates a line from the current position in the document to the right margin and breaks the line accordingly. So basically places horizontal line on a page. An empty tag <HR> basically used to draw lines and horizontal rules. It can be used to separate two sections of text.
<HR> accepts following attributes:
SIZE: Determines the thickness of the horizontal rule. The value is given as a pixel value.
Example: <HR SIZE="3">
WIDTH: Specifies an exact width of HR in pixels, or a relative width as percentage of the document width.
Example: <HR WIDTH="50%">, horizontal rule a width a 50 percent of the page width.
ALIGN: Set the alignment of the rule to LEFT, RIGHT and CENTER. It is applicable if it is not equal to width of the page.
NOSHADE: If a solid bar is required, this attribute is used; it specifies that the horizontal rule should not be shaded at all.
COLOR: Set the color of the Horizontal rule. Example: <HR COLOR="BLUE">
<HR> accepts following attributes:
SIZE: Determines the thickness of the horizontal rule. The value is given as a pixel value.
Example: <HR SIZE="3">
WIDTH: Specifies an exact width of HR in pixels, or a relative width as percentage of the document width.
Example: <HR WIDTH="50%">, horizontal rule a width a 50 percent of the page width.
ALIGN: Set the alignment of the rule to LEFT, RIGHT and CENTER. It is applicable if it is not equal to width of the page.
NOSHADE: If a solid bar is required, this attribute is used; it specifies that the horizontal rule should not be shaded at all.
COLOR: Set the color of the Horizontal rule. Example: <HR COLOR="BLUE">
Example of <HR> with its attribute:
<HTML>
<HEAD> <TITLE>
Use of Horizontal Rule Tag with attributes</TITLE>
</HEAD>
<BODY> Bangladesh Open University <HR size="4" color="red" width="30%" align="left">
School of Science and Technology <HR width="30%" align="left"> Gazipur-1705
</BODY> </HTML>
Open your web page and this is what it should look like:
<HTML>
<HEAD> <TITLE>
Use of Horizontal Rule Tag with attributes</TITLE>
</HEAD>
<BODY> Bangladesh Open University <HR size="4" color="red" width="30%" align="left">
School of Science and Technology <HR width="30%" align="left"> Gazipur-1705
</BODY> </HTML>
Open your web page and this is what it should look like:
16) Character Formatting
Dear learners what do you think about the above sentences? Can we do that in HTML? The character formatting tags are used to specify how a particular text should be displayed on the screen to distinguish certain characters within the document. The most common character formatting tags are as follows:
0 comments:
Post a Comment