HTML code to add horizontal rule spread on the 50% of the browser window.
Q4. Write an HTML code to add a horizontal rule spread on the 50% of the browser window.
Ans. The following code allows you to add a horizontal rule:
<HTML>
<HEAD>
<TITLE>
</TITLE>
</HEAD>
<BODY>
<HR WIDTH=”50%”>
</BODY>
</HTML>
The output of the above mentioned code is shown in Figure1:
Figure 1: Adding a Horizontal Rule