+ 1
Why do we need var,code,kbd,samp tags we can display the contents in other tag also???
for the interview purpose so I asked
2 odpowiedzi
+ 1
true, but it's a convention , so browsers can apply default styles , even if you forget to, or can't,
for example, browser will apply monospace font to code tags, it's better this way also because, code sections should look same for everybody, it's convenient
+ 1
in addition to it.. every tag rendered by the browsers have meaning specific..
like as you said you can format codes in other tags but why using code tag?
because it's even better for browser understanding and SEO optimization.