Skip to content

Instantly share code, notes, and snippets.

@jedahan
Created November 21, 2011 15:14
Show Gist options
  • Select an option

  • Save jedahan/1382919 to your computer and use it in GitHub Desktop.

Select an option

Save jedahan/1382919 to your computer and use it in GitHub Desktop.
Perfectly valid html5 page
<ul>
<li> item one
<li> item two
<li> item three
</ul>
<table>
<caption> Selector engines, parse direction</caption>
<thead>
<tr><th>Left to right <th>Right to left
<tbody>
<tr><td>Mootools <td>Sizzle
<tr><td>Sly <td>YUI 3
<tr><td>Peppy <td>NnMatcher
<tr><td>Dojo Acme <td>querySelectorAll
<tr><td>Ext JS
<tr><td>Prototype.js
</table>
@zippy1981
Copy link
Copy Markdown

The fact that this is valid is why I don't understand why people don't like xhtml.

@jedahan
Copy link
Copy Markdown
Author

jedahan commented Nov 21, 2011

Is this valid xhtml? Also I don't see a lot of xhtml hate...

@jedahan
Copy link
Copy Markdown
Author

jedahan commented Nov 21, 2011

@zippy1981
Copy link
Copy Markdown

No its not valid xhtml. No one hates xhtml, they just don't use it. I like all tags to have an opening and closing, or be explicitly closed (e.g.
is valid xhtml, ?
is not).

@jedahan
Copy link
Copy Markdown
Author

jedahan commented Nov 21, 2011

Different strokes then. Omitting closing tags on

  • and makes for the source code to structurally mirror the presentation, which in my opinion improves readability for documents. It also incidentally saves time and memory. For non-document data it is still closer to most DOM presenter.

    If one likes semicolons in code, they probably like closing tags. I for one can do without the visual clutter (though am not yet ready to go full-lisp :) )

  • Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment