How to Insert Horizontal Line
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:
- Lines with different widths.
- Lines with different thickness.
- Lines without 3D shading.
The following attributes of horizontal <hr> tag are used to create the different I types of horizontal lines:
Width
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>
or
<hr width= y%>
Size
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:
<hr size=n>
Align
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">
Shading
To display a horizontal line without 3D shading effect the noshade attribute is used inside the <hr> tag.
Color
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