3 ms·
I think you could do a periodic table of html elements, but the author hasn't done it here - at least not the "periodic" part. For instance, I'd expect "head"
by Karellen 13y ago
I think you could do a periodic table of html elements, but the author hasn't done it here - at least not the "periodic" part.
For instance, I'd expect "head" and "body" to be in one period, and "thead" and "tbody" in the same groups of a different period. That could put "table" in the same group as "html", with them both being "container" periods. (with "iframe" being in the same group as "html"/"table"?) "fieldset" looks like it should fit in there somewhere also, possibly with "legend" being an equivalent to "title".
Then you'd have periods like "block elements" and "inline elements", with e.g. "blockquote" and "q" being in the same group for each. Ditto "div" and "span" - which I think should be in the same group ("overly generic elements"?), not in the same period as the author has them.
Similarly, "dl", "ul" and "ol" are 3 list periods, with "dd", "li" and ... "li" in the next group - where "li" being a repeated element is an interesting bit of information you could extract from such a table.
Note that I missed "dt" in the list elements periods above, but then there's a similarity between the "dl", "dt", "dd" period, and a possible "tr", "th", "td" period.
- TheZenPsycho 13y agoYou are really making me want to do this. I liked the colored groups- that's actually useful information, disregarding its superficial similarity to the "real" periodic table of elements. It would be interesting to see a table that does a good job of grouping along other attributes like you've described here. It pretty well falls along the lines of what I once wrote about- that HTML should be split into multiple, mutually exclusive sub-languages- with guarded sections of code that does not permit tags from any other groups to be interpreted as actual tags, as enforced by the browser. If browsers had this ability: to whitelist certain tags, imagine how many XSS attacks we could avoid, by having a special container in which script and style tags (and any other tags or attributes that cause the evaluation of code) strictly do not and cannot work. OH well.