HTML HTML Basics Structuring Your Content Semantic HTML: <header>, <footer> and <section>

Amandeep Pasricha
Amandeep Pasricha
14,928 Points

Could we have wrapped Top Resources within section tags?

Wouldn't top resources deserve its own section?

I saw in the next video, they put aside tags over it. Could you have put both a section and aside element to encompass Top Resources>

clion
clion
5,130 Points

Technically, according to HTML code rules you can. However the point of using semantic tags is to add extra meaning to your containers. div is a generic container label, with no meaning so it is used merely for styling purposes.

Section indicates that all the objects inside of it are somehow related. For example, all the options of a radio button group or a label to it's input box.

aside, article and summary add the extra meaning that allow us to define extra meaning to those sections.

1 Answer

Kristaps Vecvagars
Kristaps Vecvagars
6,185 Points

As far as I know, yes, you could have. To my knowledge tags such as <section>, <article>, <main> and others have no special properties of their own, it's just how and where you use them. As far as the structure of the page goes, you can structure the entire page in <section> tags or just plain <div> tags.