DEV Community

Cover image for 24 Lesser-Known HTML Attributes You May Want to Use ✨📚

24 Lesser-Known HTML Attributes You May Want to Use ✨📚

Madza on February 01, 2022

A while ago I created an article where I covered useful HTML tags and their types. This week I decided to make a sequel, reviewing some of the HTML...
Collapse
 
sh20raj profile image
Sh Raj

Instead :- Inputmode we can directly use it in type

As Onerror we can use all JS properties like onload, onclick, etc.

Cite is the thing I was searching this day.
loading lazy was the thing I noticed in many websites but not known to it.
Very Helpful 🚀💯

Collapse
 
madza profile image
Madza

Thanks so much for the feedback 🙏❤

Collapse
 
thesanjeevsharma profile image
Sanjeev Sharma

the lazy loading attribute only works in chrome I think. so not as good as you think.

for true lazy loading, you'll have to implement your own solution using IntersectionObserver.

also, read about progressive image loading.

Collapse
 
madza profile image
Madza

Thanks for the input 🙏❤

Collapse
 
Sloan, the sloth mascot
Comment deleted
Collapse
 
madza profile image
Madza

Thanks a lot, my pleasure to help others 🙏❤

Collapse
 
spandan profile image
Spandan • Edited

Good post again
I did knew some of them but the others that I didn't know were amazing
Keep it up!

Collapse
 
madza profile image
Madza

Thanks a lot for the feedback! 🙏❤

Collapse
 
etienneburdet profile image
Etienne Burdet

Damn, I knew some, but not all of them! Cheers 🙏

Collapse
 
madza profile image
Madza

Hopefully they were useful! 🙏❤

Collapse
 
etienneburdet profile image
Etienne Burdet

Just used loading=lazy in prod! I knew for scripts, but no images.

Thread Thread
 
madza profile image
Madza

Awesome, hope it works well 🙏❤

Collapse
 
ra1nbow1 profile image
Matvey Romanov

Pretty nice :)

Collapse
 
madza profile image
Madza

Glad you liked it 🙏❤

Collapse
 
shahednasser profile image
Shahed Nasser

Great post! It would be also cool to point out the browser compatibility of some of these, but regardless it’s definitely informative!

Collapse
 
madza profile image
Madza

Thanks a lot for the feedback 🙏❤

Collapse
 
samveec profile image
samveec • Edited

Super useful, thanks for sharing!

Collapse
 
madza profile image
Madza

You are welcome! Happy to help! 🙏❤

Collapse
 
pratapkute profile image
Pratap kute

Very Good post

Collapse
 
madza profile image
Madza

Thanks, means a lot 🙏❤

Collapse
 
uithemes profile image
ui-themes

Nice, thanks for sharing

Collapse
 
madza profile image
Madza

My pleasure to help! 🙏❤

Collapse
 
johnpalmgren profile image
John Palmgren

These are great

Collapse
 
madza profile image
Madza

Means a lot, thanks! 🙏❤

Collapse
 
ishanpro profile image
Ishan Tiwari

I knew some of them but others were awesome....

Collapse
 
madza profile image
Madza

Means a world for me, thanks! ❤🙏

Collapse
 
madza profile image
Madza • Edited

See CanIUse for browser support 😉

Collapse
 
muriithigakuru profile image
Muriithi Gakuru

this is amazing content right here

Collapse
 
madza profile image
Madza

Thanks a lot 🙏❤

Collapse
 
posandu profile image
Posandu

We all know onerror!!!

<img onerror="alert('XSS!')" src="hjgh">
Enter fullscreen mode Exit fullscreen mode
Collapse
 
madza profile image
Madza

Hopefully you found others useful 🙏❤

Collapse
 
posandu profile image
Posandu

Yes, thank you for the post 😁

Thread Thread
 
madza profile image
Madza

My pleasure! 👍😀

Collapse
 
tambyrd profile image
Tam Sylte

I didn't ... granted, not an HTML expert, more like occasional dabbler. I found this post really useful for my purposes of creating nice usable but not overly fancy HTML.

Collapse
 
madza profile image
Madza

You are welcome! 😉 👍
I makes me really happy being able to help people 🙏❤

Collapse
 
serena_zubby_adfb1d13f012 profile image
Serena shannon

Congratulations to those who benefited from out platform this week
Never depend on a single income
I can still help more 30 people earn $8000 in 7days,but you will pay me 20% when you recieve it
No scam
Ask me how?
WhatsApp ‪+1 (782) 800‑6361‬