To add a horizontal line in HTML, you can use the <hr>
tag. This tag is self-closing and doesn’t require a closing tag. Here’s a simple example:
<hr>
You can also customize its appearance using CSS. For example, to change its color, thickness, and style, you can do something like this:
<hr style="border: 1px solid #000; width: 50%; margin: 20px auto;">
This will create a horizontal line that is 1px thick, solid, black in color, and 50% the width of its container, with some space around it.