What are the coolest forgotten HTML and CSS tags?
A funny email message arrived: " The other day, I was working on a site when I stumbled across a forgotten corner of HTML. The <dl> tag is a "definition list"; it uses alternating <dt> ("definition term") and <dd> ("definition definition", it seems) child elements. This sort of markup fits pretty well for, say, dates and news items, so I've used it for that.
"My question for you is, what are your favorite obscure tags? I'm not talking about <img> or <br> -- I'm talking about the ones everybody's forgotten about, like the <dl> tag. Other bits of obscurity (like weird CSS selectors) are welcome too, of course. :^)"
What a wonderful question! Of course, since I write about HTML and teach intro HTML classes, I am likely much more familiar with the definition list <dl> than most people at the close of 2004, but let me see if I can list some of my favorite obscure tags anyway...
Here's my secret: rather than obscure tags, I'm actually much more fond of character entities. For example, I build my own bullet lists by using the • character entity, and then I can tightly control exact positioning by using my other favorite character entity, , a non-breaking space. One example of this is the newly revamped APparenting.com site: all the little bullet lists on the right are created with tables and • sequences. And before you CSS purists complain, I want to point out that by using the • entity, I can wrap it in a font-size and thereby shrink it down or enlarge it to be exactly what I want. There's a lot of control you gain from CSS unordered list attributes, but changing the size of the bullet isn't one of them.
In addition, I'm addicted to the style attribute since it easily lets me tweak individual HTML elements to be "just so". A very common one: I use the <pre> tag for code listings on this weblog and if you look at the earlier entries, you'll find that they're all of the form <pre style="font-size:110%"> because without that tweak, monospace type on a typical Web page ends up noticeably smaller (read "less legible") than proportional type. Somewhere along the way I finally just defined a class called code, so more modern entries use <pre class="code"> instead. Much nicer!
I also still sometimes pull an <hr> tag out of my pocket for a quick horizontal line. In particular, I like being able to turn off shading, so a nice sequence is (using XHTML): <hr noshade="noshade" size="1" />.
One CSS attribute that I wish existed was font-color or text-color. It doesn't: you just use color instead, but if it did exist, it'd sure save me a bunch of recurring typos in my style sheets! And since I'm complaining about CSS implementation, I have to say that I've never seen a particularly fantastic typeface result from font-family: fantasy. But then again, how many people have fantasies about font families anyway? :-)
Finally, I like the CSS text-transform: uppercase within header tags as a nice way to change the appearance of headers on your page, and float:left or float:right lets you perform amazing tricks on containers that would otherwise be trapped in your layout.
How about everyone else? What's your favorite obscure or unsung HTML tag or CSS attribute?
✔ How to Create Predefined Google Image Search Links?
Thanks for the Amazon URL [see Creating Amazon Search Links]. That worked beautifully. In fact, I sent you $5.00 for coffee in thanks....✔ Can I embed a Facebook search box on my blog site?
I've seen your articles about how to add a Twitter or Google search box on a Web page, but I have a tougher...✔ Can I use CSS for drop shadows on my blog?
I want to give my site a bit of a facelift and add some neat graphical elements. One of which is drop shadows....✔ How can I embed interactive photo panoramas on my site/blog?
I read through your blog entry about how to take panoramic photos with iOS 6 and an iPhone 5 and got enthused. I've...✔ How can I create a Twitter search URL shortcut?
I'd like to add a few Twitter search links to my Web site. Is that possible, or does Twitter prohibit this sort of...
Let's stay in touch!
Sign up for my weekly AskDaveTaylor Newsletter and you'll receive even more tech and gadget help right to your inbox, along with exclusive news and industry updates. It's good stuff. I promise!
I do have a comment, now that you mention it!
Check This Out Too...
Look for Answers
All Our Categories
Apple iPad Help
Articles and Reviews
Auctions and Online Shopping
Blogs and Blogging
Building Web Site Traffic
Business and Management
Computer and Internet Basics
d) None of the Above
Google Gmail Help
Google Plus Help
Industry News and Trade Shows
iPhone and Cell Phone Help
iPod, Sony PSP and MP3 Player Help
Kindle Fire Help
Mac OS X Help
Pay Per Click (PPC) Advertising
Search Engine Optimization (SEO)
Shell Script Programming
Tech Support Video Help
The Writing Business
Twitter, LinkedIn and Social Network Help
Unix and Linux Help
Video Game Tips and Help
Windows PC Help
Find Me on Google+
ADT on G+