Which tag displays a line across the page?

Prepare for the Web Design EOPA Test. Study with interactive quizzes and multiple-choice questions, complete with hints and detailed explanations. Get ready for your web design certification!

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