I was walking through the new html 5 features and I saw and tried a lot of new tags to see what kind of affect they have on the browser but honestly I didn’t see much difference.
So lets talk about <time> tag as an example :
If you write down
<time>10:00</time>
obviously it shows 10:00 on the page
but I mean I was expecting something
advanced like formatting. For example,
if I write<time>10</time>it could
format it to 10:00 instead of just
showing 10 on the page.Also another example can be
<timeit also shows just
datetime="2008-02-14">Valentines
day</time>
Valentine dayson the page and
nothing more. No tooltip, not a fancy
animation nothing like them.
They are tags like this, and if it is needed I most probably will use span or something else and use some kinda js code to make it more appealing and that’s all.
So I am not just talking about <time> tag here, any other tags like that.
Eventually, my question is why and where we need to use them.
My best guess it to make source code more readable by codes and crawlers maybe or they can be used for semantic web. But even these answers didn’t satisfy me.
They are definitely used for adding semantic meaning to the markup. For instance:
is not as readable as using the HTML5 tags of:
It also helps to make the markup more readable to developers and I think it makes styling a lot easier. The
<time>tag falls in this boat as well as it provides more semantic meaning in your markup than a<span>tag would. This way programs in the future or browsers might be able to use that semantic data to change the time per the user’s local time zone as an example.