0
Header, Main, Footer
Hi again, Right now I learned something about : "<header>, <main> and <footer>". But I don't understand why them help me. I can use "<body>" too, I can't? I'm asking because when I write them in my Code, nothing happens what is different to "<body>". Or did I simply not understand something? Please help!
4 RĂ©ponses
+ 1
You canât see the difference. The difference is for the browser and for people who canât see and need the computer to read the content for them.
It can also be helpful for styling purposes. For example then one would target the header or footer in css.
+ 1
Ok thanks for your answer, now I understand it!đ
+ 1
<header>, <main>, <footer>, <nav>, <section>, <article>, <aside> are examples of semantic container tags.
Visually they usually act the same as <div>.
Before semantic container tags, a page would consist of many nested <div> or <span> elements to structure the page.
#ids or .classes on the divs/spans were the only way to guess what the purpose was for any given element.
Now with semantic tags, you can get rough idea of the page structure just from the tags themselves.
Which as mentioned is critical for screen readers for visually impaired users and for search engines.
0
Thanks for your notize it helps me very much.