How to Insert Horizontal Line
Category : 10th Class
To create a simple straight line on a page horizontal line is used. It is basically c graphical image which acts as dividers and separates pages into sections. It generally provides the different types of visual separation which clearly defines the sections of a page. The tag which is used to insert the horizontal line is <hr> tag. It can be of different lengths and sizes.
Horizontal lines are the following:
The following attributes of horizontal <hr> tag are used to create the different I types of horizontal lines:
The line width is specified by the width attribute of <hr>tag. To create the horizontal line with different width, the following syntax is used:
<hr width = x>
<hr width= y%>
The length of a line is specified by the size attribute of <hr>tag. To create the horizontal line with different size, the following syntax is used:
The alignment of the line indicates by the align attribute of <hr>tag. The syntax which is used to create the horizontal line with the different alignment is the following:
<hr align ="center/left/right">
To display a horizontal line without 3D shading effect the noshade attribute is used inside the <hr> tag.
The colour of the horizontal line is defined by the colour attribute of <hr>tag. In two ways the value of colour attribute can be assigned: by colour code or by colour name in RGB (Red Green Blue). The following syntax is used to create the coloured horizontal line:
<hr color="color name/color code">
How to Use Line Break
To break a line, the line break is used. Whenever you need to break a line the < br>tag is used to break it in paragraph, but a new paragraph is not started by this. Without using the additional space you can create a new line by using <br>tag.
How to Insert Comments
To insert a comment in a source code that is ignored by the browser the comment tag is used, to understand the code it is very helpful. To open a comment (<! ?) this sign is used and it is closed with (- - >) this sign.
How to Create Lists
To itemize the information in a concise format, the list makes it easy. It is used to present the elements in an attractive way and very clearly so that the user can read as well as understand it easily.
You can create three types in HTML
How to Create Ordered List
The list of items in which each item of the list has a specific numerical order come; under the ordered lists. The ordered list is also known as numbered lists. The order number can be alphabetical or numeric and that can be either a lower case 01 upper case. By using <ol> tag ordered list is created. With the <li> tag, the items of list are created.
The following syntax is used for creating an ordered list:
<li> item 1</li>
<li> item 2>/li>
How to Create Unordered List
The list which appears as a list of items and bullets and the items are presented separately comes under the unordered lists. To create the unordered lists of items the <ul> tag is used and <li> tag is used to create the elements.
The following is the syntax which is used to create the unordered list:
<li> list item 1 </li>
<li> list item 2 </li>
You need to login to perform this action.
You will be redirected in 3 sec