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
 
sehgalspandan profile image
Spandan Sehgal • 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‬