Skip to content

Conversation

@Khogendrarupini
Copy link

This pull request adds practical examples of “appropriate CSS” for styling the


element. The new section demonstrates commonly used styles such as a simple solid line, a thicker line, a dashed line, and a decorative symbol using the ::after pseudo-element.

Motivation

The current documentation mentions that horizontal lines should be styled using CSS but does not provide examples. This update addresses #42363 by giving clear, modern CSS examples that help readers understand how to style


while preserving its semantic meaning.

Additional details

This update modifies only the documentation. No structural or behavioral changes were made to the page.
Live examples are unchanged; the update is purely educational.

Related issues and pull requests

Fixes #42363

This update adds concrete examples of “appropriate CSS” for styling the <hr> element, addressing the request in mdn#42363.

The new section includes examples for:

A simple 1px line

A thicker line

A dashed line

A decorative symbol using ::after

These examples clarify how to style <hr> with modern CSS while preserving its semantic purpose.
This update adds concrete examples of “appropriate CSS” for styling the <hr> element, addressing the request in mdn#42363.

The new section includes examples for:

A simple 1px line

A thicker line

A dashed line

A decorative symbol using ::after

These examples clarify how to style <hr> with modern CSS while preserving its semantic purpose.
@Khogendrarupini Khogendrarupini requested a review from a team as a code owner December 12, 2025 12:48
@Khogendrarupini Khogendrarupini requested review from pepelsbey and removed request for a team December 12, 2025 12:48
@github-actions github-actions bot added Content:HTML Hypertext Markup Language docs size/s [PR only] 6-50 LoC changed labels Dec 12, 2025
Replaced smart quotes with standard ASCII quotes and corrected formatting around the code block to satisfy MDN linter requirements.
…amples-to-hr-#42363

Add CSS styling examples to <hr> element documentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:HTML Hypertext Markup Language docs size/s [PR only] 6-50 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HR article uses phrase "appropriate CSS"

1 participant