3 ms·
<head> does matter and you have to write your HTML as if it were there, so you can't place <title> after anything that would belong in the <body>. Think of <HT
by DasIch 10y ago
<head> does matter and you have to write your HTML as if it were there, so you can't place <title> after anything that would belong in the <body>.
Think of <HTML>, <head> and <body> as implied rather than missing.
- dunham 10y agoYeah, essentially the _tag_ is optional, but the element is still there. An example of a tag that almost everyone omits is <tbody>. A <tr> can't exist directly under <table> (per the DTD), so you're explicitly opening a <tbody> with your first <tr> and closing it with your </table>. If you look at the DOM in the browser, the <tbody> will be there.
- euyyn 10y agoWhat's the tbody for? Can I write a table with multiple tbody's? What would be the effect?
- dunham 10y agotbody is the table body, the DTD allows multiple tbodys and says "Use multiple TBODY sections when rules are needed between groups of table rows". (By "rules" they mean solid horizontal lines, but I think you'd have to explicitly add any horizontal rules that you want via CSS) Typically, you have one table header (thead) and one table body. In print, if the table spans multiple pages, you would want the header to re-appear on each page.