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 (4)
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+...
These are not “new” by any means, but the way
height
andwidth
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.loading="lazy" for lazy loading on img tag