4 ms·
5 html elements you probably never use but should
- fboliv 17y agoThis article is quite old. You'll find more recent use cases/examples on the current HTML5 editor's draft (http://dev.w3.org/html5/spec/Overview.html http://dev.w3.org/html5/spec/Overview.html). In its temporal context the author was right (fieldset/legend/abbr weren't that used) but fortunately times have changed a bit and things aren't as bad as he describes.
- mahmud 17y agoI must be one of the luck SOBs who learned proper HTML and web development first, having picked up this whole web fad just in the last year (took a long hiatus, my last web app before that was written in 2003.) I have html-generating macros and I use legend, label and abbr within fieldsets throughout my code base (though I usually forget they even exist until I see the generated code.)
- garply 17y agoSummary: <address>, <q>, <optgroup>, <acronym> or <abbr>, <fieldset> and <legend>
- zackattack 17y agoThe only tag I thought was actually useful is <optgroup>, when you have Categories (labels) in your drop-down <select> that you don't want to be selectable.
- sdfx 17y agoGood comments were made on a similar list of underused html elements that was submitted some time ago: http://news.ycombinator.com/item?id=481067 http://news.ycombinator.com/item?id=481067
- ramidarigaz 17y ago<q> doesn't seem to work in Firefox 3.0
- derefr 17y agoThe page just doesn't have the actual styles applied to it. I can verify it works in FF3 when you style it properly; I use it myself all the time.
- eli 17y agoHate to be a jerk, but I really don't see what <address> adds over <div class="address"> It is was an actual microformat for addresses, that makes sense, but it's not. It's just a tag that implies that some kind of address (virtual, physical, who knows) is contained within. Who does this actually benefit?
- Hexstream 17y ago<address> doesn't mean what you think it means: http://www.w3.org/TR/html401/struct/global.html#edef-ADDRESS http://www.w3.org/TR/html401/struct/global.html#edef-ADDRESS "The ADDRESS element may be used by authors to supply contact information for a document or a major part of a document such as a form. This element often appears at the beginning or end of a document."
- eli 17y agoFair enough, but what does that add? We should use the tag so that some yet-to-be-invented web spider might be able to automatically extract contact info for the pages it crawls?
- gaius 17y ago<address> is what people should have been using all along - I remember it was common in academic websites in the early-mid 90s, but it fell out of fashion. Similarly <em> for emphasis, the semantic meaning was lost when people switched to <b> and <i> instead.
- crcoffey 17y agonone of it seems to work very well at all in Chrome, or my Firefox 3.0 Seems to be a very redundant article.