3 ms·
Yes! I've always thought that HTML should be more like XML in that arbitrary tags should possess little presentational meaning without an associated stylesheet
by fretlessjazz 17y ago
Yes! I've always thought that HTML should be more like XML in that arbitrary tags should possess little presentational meaning without an associated stylesheet. Perhaps we'll call this new concoction... HXTML!
- sho 17y agoI can't tell if you're being sarcastic or not, but let's remember that <div id="article"> is just as meaningless as <article> without the stylesheet, and the second one looks nicer, and has more chance of becoming an (unofficial?) standard.
- lsc 17y agoThe difference is that a non-expert (such as myself) probably has a rough idea what div means. To know article is actually a div, I'd have to make sure there wasn't a valid html <article> tag.
- schammy 17y agoThat's a good point. I learned all my web development skills by looking at other people's code. If they were using tags that weren't actually "real" HTML tags, but just ones they made up and defined with CSS, it would have been a hell of a lot harder to get to where I am today.
- mistermann 17y agoAh yes, very good point!
- fretlessjazz 17y agoYah, my post was laced with (semi-blatant?) sarcasm surrounding the fact that this, as byoung2 mentioned, is already possible using a technology that was chosen for deprecation. I'm not of the pro-XHTML side, but it will be interesting to see what happens after HTML 5. XHTML attempted to solve, or at least provide a stop-gap to, a lot of problems that may not go away as easily as we hope.
- blasdel 17y ago<article> has a major difference from <div> -- it resets the heading heirarchy. <article> and <section> are nearly identical with no reason for both to exists (the only difference is that only <article> can have a pubdate attribute)
- voidpointer 17y agoThis is exactly what I thought when I read the article. However, one needs to remember the reasons for the pushback that XML and XHTML got in the web developer/designer community: The SGML based HTML allows all these nice quirks through the SGML declaration and DTD. There it is defined that tags are case insensitive, BR is always empty, you don't need to close TD and P etc... XML on the other hand has this stric notion of well-formedness where you can parse any well-formed document without a DTD or schema. This is what allows you to more easily invent your own tags and attach a style to them. Thus, with sticking with an SGML based language, HTML made a decision to make the authoring of the core language more convenient while sacrificing some of the benefits that XML would have had. It's a design decision and it has been debated a lot already. It's just something people should keep in mind.