Line Break and Horizontal Line in HTML

Line Break and Horizontal Line in HTML


Line Break Tag: <BR>

The empty tag <BR> is used, where the text needs to start from a new line and not continue on the same line. To get every sentence on a new line, it is necessary to use a line break.

Example:

<BODY>
INFOMAX COMPUTER ACADEMY <BR>
G. R. Complex Preetam Nagar <BR>
Allahabad 211011
</BODY>


Using Horizontal Rule Tag: <HR/>

An empty tag <HR> basically used to draw lines and horizontal rules. It can be used to separate two sections of text.

Example:

<BODY>
Your horizontal rule goes here. <HR/>
The rest of the text goes here.
</BODY>


Attributes of <HR/> Tag:


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 alternative width as percentage of the document width.

Example:

<HR WIDTH="50%"/>

horizontal rule a width a 50percent 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"/>

Html : Line Break and Horizontal Line in HTML Program List