0
Why we gotta use <header> before heading? We can simply write <h1> or any other heading.
Also, which of these is tag and which is element?
5 Respuestas
0
tavilefty you are correct, you can achieve with <h1> tag for heading text/data/information for the page the same as <header>. <header> is much more, think of logical container where you can mix <nav>, <ul>, logo and other tags for content representation.
For example, similar approach is practised in PHP programming for including static/constant content of the web page like include header.php , footer.php or other pages.
+ 2
You're not mandatory to use them...
Usualy <h1> is wrapped in a <header> when the header will contains other elements than just a <h1>
There are both tag AND element: we just name differently depending on context:
1) source code => tag
2) document object model (DOM) => element
+ 1
You can write h1 for heading but when you would make a full website there you will need header, nav, section and footer tags.
+ 1
You can use <div> tag instead of them but in html5 using those tags will be easier while coding.
0
Samira but what if I don't use them?