THEAD definition
TL;DR Summary
THEAD definition: <thead> element is used inisde <table> element to define header of the table.
Inisde you can put <th> elements to specifiy titles for each column.
Below is the code table example:
And this is the final result:
In short that is it.
More Details
<table> element is no longer use that much. And a lot of programmers (me included) prefer to use <div> elements instead.
You can try it out very simple. Just set width: 50% and float: left; and you got yourself a table :)
Here is the code that does the same with <div> elements as the code above:
As you can see the code is also simpler to work with and it’s not as nested as in the <table> example.
And here’s how it looks in the end:
So you get the same result and <div> tables are much easier to work with. And this is thead definition in a nutshell. Hope you learned a lot.
Until next time,
Will
Senior Developer & SEO Algo Specialist