|
|
Subscribe / Log in / New account

Fedora and fallback DNS servers

Fedora and fallback DNS servers

Posted Feb 26, 2021 0:42 UTC (Fri) by NYKevin (subscriber, #129325)
In reply to: Fedora and fallback DNS servers by pbonzini
Parent article: Fedora and fallback DNS servers

HTML5 solves that problem by specifying that you can just write <td> and then a closing tag is inferred at the next <td> or <th>, or at the end of the <tr>. This is not considered "error handling," either. It's perfectly legal to omit the closing tag, and the result is considered a well-formed HTML5 document. This was certainly never the case in XHTML, although I'm not sure how HTML4 handled this sort of chicanery.

If you do include the slash, it just strips it out and emits a parse error, so you would end up with an unclosed <td>. But as discussed in the previous paragraph, that <td> will probably close itself anyway, and so it hardly matters.

Incidentally, you can also do this with <p>, meaning you can write prose like this:

<p>
Here is a paragraph of text...
<p>
Here is a second paragraph...
<p>
[and so on]

This is also considered well-formed HTML5.


to post comments

Fedora and fallback DNS servers

Posted Feb 26, 2021 1:20 UTC (Fri) by jkingweb (subscriber, #113039) [Link]

> HTML5 solves that problem by specifying that you can just write <td> and then a closing tag is inferred at the next <td> or <th>, or at the end of the <tr>. This is not considered "error handling," either. It's perfectly legal to omit the closing tag, and the result is considered a well-formed HTML5 document. This was certainly never the case in XHTML, although I'm not sure how HTML4 handled this sort of chicanery.

This has been a design feature of HTML from its earliest days. Many end tags are optional, as are some start tags, including those for html, body, and tbody.

That last is perhaps lesser-known: in an HTML (but not XHTML) document, <tr> is never a child of <table>; there is always an implicit tbody (or explicit thead or tfoot) element in between.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds