Tag HTML | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Tag HTML

why in html language especially tag h has a level 1 until 6 ? whereas we know font size can change from css but why html still make clatification tag h with size font ?

3rd Jul 2020, 12:43 AM
Kevi Alfianda Riza
Kevi Alfianda Riza - avatar
6 Answers
+ 10
Kevi Alfianda Riza , Maybe not the only reason but I think it's related to what is called semantic tag and SEO and also accessibility for impaired people using screen reader. When browsers or search engines read the html it is interpreted relatively to the meanings of the tags . A h tag will indicate that it is something to be treated with a kind of importance like maybe a main title if it is h1. The font size in CSS allow you to adapt size according to your wishes but doesn't give such info about the purpose as an h tag do.
3rd Jul 2020, 12:53 AM
EmmanueLZ.
EmmanueLZ. - avatar
+ 6
heading tags history is longer than css
3rd Jul 2020, 12:50 AM
Gordon
Gordon - avatar
+ 5
EmmanueLZ. nice explanation 👍
3rd Jul 2020, 12:55 AM
Gordon
Gordon - avatar
+ 2
Gordon ,thanks 🙂
3rd Jul 2020, 12:56 AM
EmmanueLZ.
EmmanueLZ. - avatar
+ 1
oh i see thanks EmmanueLZ. for the explanation.
15th Jul 2020, 6:19 PM
Kevi Alfianda Riza
Kevi Alfianda Riza - avatar
0
and thanks Gordon for the explanation too
15th Jul 2020, 6:20 PM
Kevi Alfianda Riza
Kevi Alfianda Riza - avatar