DEV Community

Cover image for What are some HTML attributes and tags that you’ve discovered recently?
Nick Taylor
Nick Taylor

Posted on

 

What are some HTML attributes and tags that you’ve discovered recently?

Louis Lazaris published Those HTML Attributes You Never Use on Smashing Mag recently.

I knew a few of the HTML attributes they mention in the blog post, e.g. the download attribute for an anchor element, but there were definitely some that were new to me.

What are some HTML attributes and HTML tags that you’ve discovered that others might not know?

Top comments (5)

Collapse
 
ashleyjsheridan profile image
Ashley Sheridan

I was going through the whole list of tags to make a wizard to help with picking the right one for any given purpose, and found out about <ruby>, <rt>, and <rp> elements. Can't really see myself ever using them, but it was interesting to find out about them and what they're used for: developer.mozilla.org/en-US/docs/W...

If anyone is interested in the wizard tool I made too, it's at ashleysheridan.co.uk/blog/Picking+...

Collapse
 
ben profile image
Ben Halpern

These are not “new” by any means, but the way height and width have become tools to help images take up space before they fully load in order to make layout easier is a low-key huge browser enhancement.

Collapse
 
nickytonline profile image
Nick Taylor

It's True - Dwight Shrute

Collapse
 
jfbrennan profile image
Jordan Brennan • Edited

Table apparently was supposed to get a sortable attribute. Just learned that today. I was gonna use it anyway to define a rule for my sorting styles, but ended up not needing it (selector on self was enough th[aria-sort]).

Collapse
 
sivabalan02 profile image
Sivabalan

loading="lazy" for lazy loading on img tag

Super Useful CSS Resources

A collection of 70 hand-picked, web-based tools which are actually useful.
Each will generate pure CSS without the need for JS or any external libraries.