hr tag attribute and its use

158 Views

hr tag attribute and its use

Html <hr> tag

By using html <hr> tag, some time we need to style <tr> tag as per page or design requirement. For styling <hr> tag we can use htrml <hr> tag attribute or css styling.

<hr>  tag

<hr>

An example with <hr> tag.

 <html>
<head>
<title>hr tag with attribute</title>
</head>
<body>
<p>Example hr tag</p>
<hr>
<p>Above hr tag contan width and align attribute.</p>
</body>
</html>

<hr> tag with attribute:

<hr width="50%" align="left">

lets try an example of <hr> tag with its attribute:

 <html>
<head>
<title>hr tag with attribute</title>
</head>
<body>
<p>Welcome to studyzone4u.com</p>
<hr width="50%" align="left">
<p>Above hr tag contan width and align attribute.</p>
</body>
</html>

 

Other attributes of <hr> tag

There are some other attributes of <hr> tag which is commonly use in html page.

HTML <hr> tag attribute
width value taken in "px" or "%" This is use to set width of <hr> tag.
size value taken in "px" or "%" This is use to set size of <hr> tag.
align Accpeted value is left|center|right This is use to set alignment of <hr> tag.
noshad Accpeted value is noshad This is use to remove shad from <hr> tag.

 

Tags:-
HTML