Slashdot Log In
Finally We Get New Elements In HTML 5
Posted by
ScuttleMonkey
on Wed Aug 08, 2007 12:49 PM
from the not-so-patiently-waiting dept.
from the not-so-patiently-waiting dept.
An anonymous reader writes "Pure HTML enhancements hardly grew at all in the last eight years. Forward motion basically stopped in 1999 with HTML 4. Now the future looks bright. Recently, HTML has come back to life with HTML 5. Tons of new elements will be available for structure (article, nav, section, etc.), block semantic elements (aside, figure, dialog), and several other functions."
Related Stories
Submission: Finaly we get new elements in HTML 5 by Anonymous Coward
This discussion has been archived.
No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
Full
Abbreviated
Hidden
Loading... please wait.
Oh noes! (Score:4, Funny)
Excellent! (Score:5, Interesting)
On a slightly more serious note, it sounds like they're giving up on having most browsers support CSS styling of XML, and just adding new tags that serve no point other than being CSS targets. Semantically, what's the difference between:
<div class="article">...</div>
And:
<article>...</article>
Answer: Nothing. One is easier to type and less verbose, and the CSS selector rule saves a single character.
Re:Excellent! (Score:5, Funny)
Actually, they need to put in an <ad> tag.
Parent
Re: (Score:3, Insightful)
The problem with semantic anything is that it requires an agreement as to what marks what. If you want to be able to mark articles right now, you can do it with HTML 4, and agreeing that anything that is semantically an article is marked with the "article" class. In fact, it's already been done: they're called microformats [wikipedia.org].
Changing <div class="article"> to <article> accomplishes nothing, other than reducing the amount of text that needs
Re:Excellent! (Score:5, Insightful)
Parent
Re:Excellent! (Score:5, Insightful)
The fact of the matter is, nobody will use the damn tags correctly and then a screen reader will read a paragraph on Viagra before actually getting to content.
More bastardization of already bastardized HTML... and even more new ways to fuck things up.
Parent
Re:Excellent! (Score:5, Funny)
Parent
Re:Excellent! (Score:5, Insightful)
Microformats are a good solution where a problem is domain-specific. HTML is extensible with mechanisms like the class attribute so that HTML doesn't have to include lots of element types that aren't useful to most people.
But when something is applicable to a wide variety of situations, the right place for it is in the HTML specification, not as an ad-hoc extension. Otherwise, you could just make the argument for every element type under the sun being replaced with <div class="..."> or <span class="..."> . At that point, you're just using the class attribute as a bodge to avoid new element types, not because it's a good idea.
Yeah, sure, it's nice that browsers don't have to be updated for microformats to work. But that doesn't mean it's good design to try to stuff everything under the sun into the class attribute. Sometimes the right place for something is in the HTML specification.
Parent
Re:Excellent! (Score:5, Informative)
Parent
Re:Excellent! (Score:5, Insightful)
Web developers want their ads to be seen. They aren't going to make it easy for those ads to be blocked.
Parent
Re:Excellent! (Score:4, Insightful)
Parent
Re:Excellent! (Score:4, Interesting)
This is a common misconception. The class attribute is intended for general purpose classification of elements, not merely as a style hook. The idea is that you classify your elements in a meaningful way (i.e. provide semantics), and then your stylesheets, scripts, etc, can use those semantics to manipulate the document in a useful way.
No, they wouldn't be parsed any differently, but they might be rendered differently.
Parent
Re:Excellent! (Score:5, Insightful)
Parent
Re:Excellent! (Score:5, Informative)
Imagine someone searches for radioactive horses, and Google has crawled two web pages which contain those two words, one in which both words occur within ordinary prose, the other in which each word occurs in separate sibling <article> elements. It could very well make sense to give the page with the <article> elements a lower precedence because from the semantic information we know that there's a good chance the two peices of text are independent of each other (ie. that there is no text about radioactive horses, just two different peices of text: one involving something radioactive and the other involving horses).
Of course this isn't the only way it might be helpful, that's just something off the top of my head. The point is that giving text some additional meaning does have benefits, even if they aren't always immediately clear.
Parent
Re:Excellent! (Score:4, Insightful)
HTML 5 is something you can pick up along the way. It's very much accessible to the common man with just a smidgen of computer knowledge. Raw XML is learnable too, if somewhat inconvenient for beginners in its strictness when hand-editing. Styling it on the other hand is not something for the layman. I don't think anyone who's worked with XSLT and XPath could honestly disagree that they are progammers' tools and shouldn't be considered for the casual web author.
One other benefit of HTML 5 over XML is that it can fail gracefully on old and unsupportive browsers. With HTML 5 the worst thing you're likely to get is HTML 4.01 support with some text that doesn't style appropriately. With XML you're stuck.
Parent
Re:Excellent! (Score:5, Insightful)
Parent
Re:Excellent! (Score:4, Informative)
Parent
Re: (Score:3, Informative)
More tags for browsers to neglect to implement!
No argument here - but I do take issue with your assessment of the <article> tag. The difference between <div class="article"> and <article> is that "<article>" has some implied meaning that a browser will in fact be able to infer, whereas a browser will not (and should not) infer any real meaning from the CSS class.
While this is not terribly relevant to rendering the page in it's original/intended format - i can see it being very useful for indexing and searching blogs, encycl
Re: (Score:3)
Actually, I think you're confusing the semantic content of the element (the former says 'This is a division of a page in the article class', the latter says 'This is an article') with the actual intended content of the element. This is really of particular interest to Semantic Web and RSS technologies, as it gives an actual semantic context to the content inside the element, rather than an implied one that is dependent on human-interpretation to understand.
The idea of HTML+CSS was to separate semantic mar
Re:Excellent! (Score:4, Insightful)
I would go so far as to say <div class="article"> is semantically useless. Sure a human or a clever heuristic engine can infer some meaning from that, but it's too imprecise to be of much use on a large scale aggregation or data mining.
Frankly I'm not a huge believer in HTML semantics anyway. Standards snobs will endlessly critique the use of a <ul> vs an <ol> on the merit of "semantics" which in practice makes no appreciable difference. It's like they've never seen tag soup and the real reason for using CSS.
That said, a lot of these new tags are well overdue. If you consider HTML hasn't changed in 10 years and at that time we barely knew how the web would be used. HTML is pretty good for traditional text, but it has virtually nothing for the web as we know it. For instance, structural markup defining navigation has an actual tangible benefit. Browsers (especially screen readers) could make wonderful use of that information.
Parent
Re:Excellent! (Score:5, Funny)
Parent
Oh great... (Score:5, Funny)
Re:Oh great... (Score:4, Funny)
What?
We get new tags
Firefox Turn On
It's new!
How are you gentlemen? All your tags are supported by us
Parent
How about a Declarations area? (Score:3, Funny)
I'd like to see an ability to use a <Declaration> area, then you can use inline (Declare @xxx) or linked (Imports xxx.x) definitions and such.
Just an idea.
Do we need "MORE"? (Score:4, Insightful)
I mean, seriously - I can do anything I need to do with a web page with the tools we have right now. Adding more options just results in more bloat, more exceptions and errors, and more difficult compatibility. It means new versions of other software to keep up, and new ways to exploit.
When do we need well enough alone?
Re: (Score:3, Insightful)
Re:Do we need "MORE"? (Score:4, Insightful)
Want a menu? Gotta write javascript. Want to restrict the length of a textarea? Gotta write a script. Want to make that select box behave like a real select box in a desktop app (where you can type to find a value)? Gotta write javascript.
New tags that accomplish what should be standard behavior would make most websites much leaner and therefore much more maintainable. TFA did not indicate that select or textarea elements are going to be spruced up, though.
Parent
Do we really need to stop progress? (Score:5, Interesting)
With the one exception of Microsoft letting IE rot for 7 years, the advancement of the web has been steady and rapid. Even while IE was a thorn in our side, we were able to drop support for NS4, then IE5, then IE5.5. Firefox and Safari continually pushed the envelope of standards support. Javascript toolkits proliferated, bridging the gap between implementations. Even 5 years ago, using CSS for site layout was a much more difficult proposition than it is today.
Now, if you had actually read the article, you would see that some of these tags provide very common functionality that currently require a mess of tag soup, CSS, and/or javascript. <video> and <audio> tags for instance, or <progress>. Sure you can't use them now, but in 10 years everyone will use them, and they'll be horrified with what we used to have to do. There's no reason to stop progress just because a handful of browser makers and lethargic standards bodies haven't yet perfected the first de-facto cross-platform, cross-media information platform in human history.
Parent
Re:Do we need "MORE"? (Score:4, Interesting)
Parent
Web 1.0 (Score:3, Funny)
I'm looking forward to Web RC1 in the next 5 years.
what happened to xhtml? (Score:4, Interesting)
Re:what happened to xhtml? (Score:5, Interesting)
Yes. Kind of.
There are currently to Working Groups in the W3C working on markup -- the XHTML working group [w3.org], and the HTML working group [w3.org]. These are separate entities with separate memberships and separate processes.
XHTML was originally intended to be the successor to HTML. But a couple of things that happened after XHTML1 "shipped" caused that to be re-evaluated:
When it became clear that continuing down the XHTML path promised tons of heartburn for publishers and user-agent developers without much reward in return, people started thinking that maybe rebooting the HTML specification process wouldn't be such a bad thing. The W3C picked up the WHATWG's [whatwg.org] independent "HTML5 [whatwg.org]" spec as a starting point, and that's where we are today: XHTML is for people who are comfortable with radical changes between versions of the spec and Draconian error processing; HTML is for people who want backwards compatibility and less strict parsing.
Parent
Re:what happened to xhtml? (Score:5, Funny)
- That, of course, would belong in the much anticipated <bender> tag.
Parent
Re: (Score:3, Interesting)
The browsers relative level of eventual support will declare the winner after buch blood sweat and tears.
Good and bad at the same time (Score:4, Interesting)
On the one hand I welcome new tags like datagrid and menu, which will make HTML source easier to handle. Even though the increased complexity will make it harder to start with HTML. Most web developers still have problems with XHTML/CSS, advancing HTML will make that worse.
Most likely this will lead to more automatically generated code, which in the long run (in combination with XML compliance) should lead to less buggy web pages and general browser compatibility. Which is a good thing. But somehow I think that one of the reasons HTMLs use has become so widespread (Microformats [wikipedia.org] etc.) is simply because it was so easy to mess around with. Making it "better" might slow down innovation in these areas, which would be sad.
Up to now, new HTML elements... (Score:4, Funny)
Still no <bgsound tune, repeat> ? ;-) (Score:5, Funny)
repeat:byte; 0 = ad nauseam
With MOD [wikipedia.org] support - of course!
The most greatly wanted tag (Score:5, Funny)
Re:The most greatly wanted tag (Score:5, Funny)
Parent
So do tags ever deprecate? (Score:5, Interesting)
It's like slapping on a shiny new paint job on your car, but the back seat is still full of old McDonald's bags.
Announcing (Score:5, Funny)
Almost as good as TeX!
Link to the actual WHATWG Working Draft for HTML 5 (Score:5, Informative)
I'm in the money! (Score:5, Funny)
It's 1999 all over again, baby!
permablink? (Score:5, Funny)
Seems useful (Score:5, Informative)
Even if browsers do not support these tags, the content of the tags will be displayed- if you don't want this, simply comment them out like so:
<newtag><!-- some stuff --></newtag>.
For tags that do not want their content displayed, there usually is an accompanying 'no' tag:
<script><!-- script goes here --></script>
<noscript>Your browser does not support scripts.</noscript>
With these new tags, browsers may not display a page any differently- instead of
<div class="article">articletext</div>
and a stylesheet saying
now you get
<article>articletext</article>
and a stylesheet saying
article { font-family: serif; }
This will *already* be rendered equally in both old and new browsers. Some of these may end up having a fancier display in new browsers; I imagine dates could have a date picker style pop-up to better visualize the 'when'.
Even if some extensions seem to have limited use from a front-end rendering perspective, this can have a huge impact on search engines, for example, which is great. Although I must admit that I have second thoughts on some of the tags that seem to require JavaScript.
XHTML/HTML divergence (Score:5, Insightful)
What's wierd about this is that it goes off in a completely different direction than XHTML. Tags don't have to be properly closed, no namespaces, etc.
A big advantage of XHTML was that the conversion to a parse tree was unambiguous. Why give up that at this late date? All this ambiguity breaks visual HTML editors. Dreamweaver 3 was closer to "what you see is what you get" than today's Dreamweaver 8.
Consider, for example, a lone </br> that doesn't terminate anything. Most browsers today treat that as a valid break, not an orphan tag to be ignored. XHTML was supposed to end that kind of nonsense.
The problem with XHTML has been that CSS layout was badly designed. "float" and "clear" just aren't a good set of layout primitives. Cell-based layout (yes, "tables") was a fundamentally more powerful concept. But it's not XHTML that's the problem. It's that the positioning mechanisms for "div" sections are terrible.
Layout is really a 2D constraint problem. Internally, you have constraints like "boxes can't overlap", which turns into constraints like "upper left corner of box B must be below lower left corner of box A", or "right edge of box A and left edge of box B must have same X coordinate". Browsers really ought to do layout that way. Table layout engines come close to doing that. At least with tables you never get text on top of other text. "div" doesn't have comparable power. "float" and "clear" represent a one-dimensional model of layout, and that's just not good enough.
Re:XHTML/HTML divergence (Score:4, Interesting)
HTML5 is being developed hand-in-hand with XHTML5, which is merely the XML serialization of HTML5. Don't worry. You don't have to give up <br /> if you don't want to.
That being said, I do believe that CSS still has fundamental problems that not even CSS3 seems to be solving, such as taking into consideration the growing use of HTML as an application framework rather than a document framework. The most notable issue of this would be the inability to center an object vertically in a viewport without Javascript to determine its size, which is a klutzy hack at best. The float: and clear: primitives, as you mention, are also comparatively weak (since you can't just float an element, have text flow around it, AND position it vertically), though CSS3 is introducing a Multi-column layout module [w3.org]. There are other issues too, but I can't pull them off the top of my head at this time.
Parent
need more tags (Score:5, Funny)
<//> close all open tags
</fix> instantly fix everything that is wrong with the site
<beer> because I need one, preferably a one of class="cold"
Re:Can't we do all this stuff already? (Score:5, Informative)
Yes, in browsers that fully implement XHTML.
Which, assuming you want to support IE users, means no.
Of course, it's not like we can expect IE to rush out to support these new tags either. Making the whole effort, honestly, pointless.
It's already possible to take a plain XML document and style it completely using only CSS. It turns out to be impractical (some tags sort of require special support that can't be duplicated just by CSS rules, like <img>, <a>, and <script>), but it's possible.
Parent
Re:I'll tell you why... (Score:4, Informative)
Parent