Which tag displays a line across the page?

Learn web design with our comprehensive test guide. Improve your skills with flashcards and multiple choice questions. Each question includes hints and explanations. Get ready to ace your exam!

Multiple Choice

Which tag displays a line across the page?

Explanation:
The horizontal rule element, <hr>, is used to display a line across the page. It’s a void element that represents a thematic break between sections, so inserting <hr> places a horizontal line that stretches across its container. You can style it with CSS (for example, changing width, height, color, or margins) to fit the page design. Other tags mentioned aren’t standard HTML for creating a page-wide divider. For instance, <line> exists in SVG for drawing a line between two points and isn’t the same as a full-width horizontal rule in HTML. Tags like <separator> and <rule> aren’t recognized HTML elements, so they won’t render as a horizontal line in typical HTML documents.

The horizontal rule element,


, is used to display a line across the page. It’s a void element that represents a thematic break between sections, so inserting
places a horizontal line that stretches across its container. You can style it with CSS (for example, changing width, height, color, or margins) to fit the page design.

Other tags mentioned aren’t standard HTML for creating a page-wide divider. For instance, exists in SVG for drawing a line between two points and isn’t the same as a full-width horizontal rule in HTML. Tags like and aren’t recognized HTML elements, so they won’t render as a horizontal line in typical HTML documents.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy