what is the role of <hr> tag? what are the various attributes it can take?
ReportThe <hr> tag in HTML stands for horizontal rule and is used to insert a horizontal rule or a thematic break in an HTML page to divide or separate document sections. The <hr> tag is an empty tag, and it does not require an end tag. Attributes of the <hr> tag are 1). Align- Used to specify the alignment of the horizontal rule. 2). noshade-Used to specify the bar without shading effect. 3). size- Used to specify the height of the horizontal rule. 4). width- Used to specify the width of the horizontal rule.
<!DOCTYPE html>
<html>
<body>
<p>There is a horizontal rule below this paragraph.</p>
<!--HTML hr tag is used here-->
<hr>
<p>This is a horizontal rule above this paragraph.</p>
</body>
</html>
Thread Reply