Advertisements
Advertisements
Question
Briefly explain the attributes of <hr> tag.
Solution
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>
APPEARS IN
RELATED QUESTIONS
Write HTML Code for the following table.
What are the types of list in HTML?
How will you define numbered list?
Write an HTML code to display the following text in exactly the same way as given below
I am studying Computer Science Application.
What are the core tags used to create table in HTML?
Difference between <UL> and <OL> tags.
Write HTML code to produce the following table:
A | B |
C |
Write an HTML code the show the following text:
MODERN ATOMIC THEORY The findings of modern atomic theory are given as follows:
|
Explain the types of list with suitable HTML code.
Observe the screenshot of the given web page:
Write suitable HTML code to design it.