How do you make a horizontal line black in HTML?
Horizontal lines on a page is done with the tag <HR>. Lines are usually just black, thin, solid lines, but they can be styled with color, thickness, width etc. and they can be dashed, dotted, etc.
How do you change the color of a horizontal line?
Answer: Use the CSS background-color Property
You can simply use the CSS background-color property in combination with the height and border to the change the default color an <hr> element. In the following example we’ve changed the color of hr tag to light grey.
How do you add a line in HTML?
Type <hr> anywhere in the body of your HTML document.
The body of your HTML tag is the area in between the “<body>” and “</body>” tags. This adds a horizontal line to your HTML document. Your CSS style settings will apply anytime you use the <hr> tag in your HTML.
How do I make a horizontal line thicker in HTML?
If you want to change the thickness, or height of your horizontal line, add the height property to your <hr> style. In this case, you can also set the background-color property for the thick horizontal line.
How do you change the size of a horizontal line in HTML?
- Align a <hr> element (with CSS): <hr style=”width:50%;text-align:left;margin-left:0″> …
- A noshaded <hr> (with CSS): <hr style=”height:2px;border-width:0;color:gray;background-color:gray”> …
- Set the height of a <hr> element (with CSS): <hr style=”height:30px”> …
- Set the width of a <hr> element (with CSS):
How do I select a horizontal line in Word?
- Put your cursor in the document where you want to insert the horizontal line.
- Go to Format | Borders And Shading.
- On the Borders tab, click the Horizontal Line button.
- Scroll through the options and select the desired line.
- Click OK.