HTML HTML Basics Images, Text and Links Creating Breaks in Content

Jacky Chau
Jacky Chau
Full Stack JavaScript Techdegree Student 8,106 Points

Relation between <hr> element and <section>element

"The HTML <hr> element represents a thematic break between paragraph-level elements: for example, a change of scene in a story, or a shift of topic within a section." <- After reading the above definition, I had some questions.

Question 1:Does the word "section" above necessarily mean the <section> tag?

Question2: Can I use <hr> for the purpose of indicating the transition of one <section> tag to another <section> tag.
For example:

<section>
  <h2>About myself</h2> 
    <p>I am Jacky</p>
</section> 
<hr>
 <section>
 <h2>About herself </h2>
   <p>She is Alice.</p>
</section> 

Thank you very much for your help.

2 Answers

Steven Parker
Steven Parker
177,602 Points

I don't think the word "section" in that particular text is intended to refer to the <section> element. I think they just mean a collection of related text.

And you certainly could place one between actual section elements if you want, though the MDN Page recommends it for separating "paragraph-level elements".

And remember that browsers render it by default as a visible horizontal line.


(something like that :point_up:).