0

Is there any correct way to name the content element in the "section" tag?
I have sections with headings and i need to wrap the content of the sections into something.
Particularly in my case because the content elements are surrounded by one single border.
But also generally, is there no correct way to name that one big content element? Will I really just have to use the "div" and settle with that?

Also, the the same question for the "article" tag...

zwieble
  • 11

1 Answers1

0

Is there any correct way to name the content element in the "section" tag?

This question is confusing somehow. You just can wrap the content in just anything what fits your needs. For example a "h1" tag works. Of course, if you need a pretty common tag, a "div" is the way to go.

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/section

Example:

<section>
  <h2>Heading</h2>
  <img>some image</img>
</section>

Also, the the same question for the "article" tag...

Also, the same answer for the "article" tag...

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/article

Example:

<article>
  <h4>A nice article</h4>
  <p>Awesome text</p>
</article>
OddDev
  • 3,644
  • 5
  • 30
  • 53