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!

13th Jan 2025, 5:52 PM
ParaworldSL
ParaworldSL - avatar
4 ответов
+ 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.
13th Jan 2025, 7:49 PM
Zvi
Zvi - avatar
+ 1
Ok thanks for your answer, now I understand it!😄
14th Jan 2025, 5:52 AM
ParaworldSL
ParaworldSL - avatar
+ 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.
15th Jan 2025, 7:33 AM
Shardis Wolfe
0
Thanks for your notize it helps me very much.
15th Jan 2025, 10:31 AM
ParaworldSL
ParaworldSL - avatar