Advertisements
Advertisements
प्रश्न
Briefly explain the attributes of <hr> tag.
थोडक्यात उत्तर
उत्तर
The <hr> tag having four attributes viz. size, width, no shade and color. These attributes are used to set size, width, 3D appearance and color to the horizontal line respectively.
The general syntax of <hr> tag with attributes:
<hr size=valuewidth=value noshade, color=color_name/code>
- Size:
The thickness of the horizontal line can be changed with the size attribute. The size is given in terms of pixels. - Width:
The width attribute specifies the horizontal width of the rule line. The default rule is drawn across the full width of the browser. The value of the width attribute may be the exact width of the rule in pixel or a certain percentage. - No shade:
The default view of a horizontal rule line is 3D. So, no need to specify the term “no shade” as an attribute with <hr> tag. If we specify the attribute “no shade” turn off 3D view, turns on 2D view. No shade is a Boolean type attribute. - Color:
The horizontal line is displayed in gray color by default. The color attribute is used to change is default color to the desired color.
Example:
Ruler with size 9 pixels, 50% width, 2D, in Green color
<hr size = 9 width = 50% noshade color=Green>
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?