DEV Community

Cover image for HTML5 Elements You Didn't Know You Need

HTML5 Elements You Didn't Know You Need

Max Prilutskiy on May 21, 2025

As you know, we love unusual tech at Lingo.dev. So when in my last essay, David commented he was surprised to not see "dialog" HTML element, it hit...
Collapse
 
mrlinxed profile image
Mr. Linxed

Nice article!

Maybe you can add some screenshots of what every element looks like by default?

Collapse
 
maxprilutskiy profile image
Max Prilutskiy

ah nice, good idea!

Collapse
 
vnn profile image
Vincent Tantardini

Great tips, im using a bunch of them on my project's website.
I'm gonna add an other one to your list if you let me ;) : you can also achieve scroll interactions using link anchors and ids same as before using "#top" for example but now smoothly.

Just add the CSS rule:

html {
  scroll-behavior: smooth;
}
Enter fullscreen mode Exit fullscreen mode
Collapse
 
maxprilutskiy profile image
Max Prilutskiy

wow, this is really nice! :)

Collapse
 
vrcprl profile image
Veronica Prilutskaya 🌱

Cool!

Collapse
 
vrcprl profile image
Veronica Prilutskaya 🌱

time

Collapse
 
maxprilutskiy profile image
Max Prilutskiy

right? this is pretty cool!

Collapse
 
nevodavid profile image
Nevo David

pretty cool seeing all these native elements getting some real use - you think people avoid them just because it’s habit at this point or something bigger?

Collapse
 
maxprilutskiy profile image
Max Prilutskiy

I think we, on average, got used to searching for 3rd party libs right away, or using chatgpt trained on mostly mature websites, instead of studying the fundamentals!

Collapse
 
getsetgopi profile image
GP

WoW! It's been a while I looked into HTML tags. Never knew about <details> , <summary> , <output> and <meter>. I'm already thinking where can I use this in my project.

Collapse
 
maxprilutskiy profile image
Max Prilutskiy

<meter> is my favorite, basically a progress bar!

Collapse
 
jesterly profile image
jesterly

I wish browsers would render it using more colors than red, yellow, and green.

Thread Thread
 
maxprilutskiy profile image
Max Prilutskiy

yep, 100%

Collapse
 
ryanguitar profile image
Ryan Els

Excellent article 😁👌

Collapse
 
mileswk profile image
MilesWK

<meter> is going to be a fun one to mess around with! This is awesome post!

Collapse
 
maxprilutskiy profile image
Max Prilutskiy

yeah indeed! :)

Collapse
 
tom-leamon profile image
AVsync.LIVE

These sound appealing, but offer limited ability for custom styling. You are forced to use default browser styles, which look different across different browser engines. If you want full control over appearance and UX it’s best just use a UI library or build your own.

Collapse
 
maxprilutskiy profile image
Max Prilutskiy

yep, i agree with this! unless you already use tailwind that can be added on top.

Collapse
 
vl_ramnghakaveeel_43d profile image
VL Ramnghaka (Vee el)

Saved...

Collapse
 
maxprilutskiy profile image
Max Prilutskiy

Collapse
 
prabhagaran_madhavan_890d profile image
Prabhagaran Madhavan • Edited

Nice post!

Collapse
 
maxprilutskiy profile image
Max Prilutskiy

thanks :)

Collapse
 
lightflight profile image
Georgy Yuriev

The example with "mortgageCalc" doesn't seem to work

Collapse
 
maxprilutskiy profile image
Max Prilutskiy

updated the second snippet!

Collapse
 
ddebajyati profile image
Debajyati Dey

Great article! I will recommend this to my friends too

Collapse
 
nathan_tarbert profile image
Nathan Tarbert

Pretty cool seeing native stuff like this actually get some respect - makes me wanna rethink how much I use divs for everything.

Collapse
 
baltasarq profile image
Baltasar García Perez-Schofield

Great. I already knew about dialog, details, and datalist, but meter and figure are refreshing to know about!!

Collapse
 
dotallio profile image
Dotallio

Love this roundup! The dialog and meter elements especially always surprise me - do you have a favorite use case where going native saved you from a giant dependency?

Collapse
 
maxprilutskiy profile image
Max Prilutskiy

Meter is nice, in my opinon, when you have to show a quick unsophisticated meter in the app :)

Collapse
 
wilmela profile image
Wilmela

Awesome

Collapse
 
urbanisierung profile image
Adam

Great article. Thanks!

Collapse
 
natedhaliwal profile image
NateDhaliwal

Oh my... I have always wanted to get a modal without some JS framework... and I have it!

Collapse
 
maxprilutskiy profile image
Max Prilutskiy

sometimes all you need is plain html, css and vanilla-js.com/

Collapse
 
creator_x profile image
Xion Apex Academy

hahaha i learnt something new thanks man will try them out. Funny you right i dont think i have ever used any of these before 😂

Collapse
 
maxprilutskiy profile image
Max Prilutskiy

🫡 🫡

Collapse
 
maxprilutskiy profile image
Max Prilutskiy

on new HTML tags? :)

Collapse
 
samuraix13 profile image
SamuraiX[13~]

Seems like it's time to accept HTML as a programming language lol didn't have any kind of interaction with HTML for so long and never really knew about this, definitely useful, thanks!

Collapse
 
maxprilutskiy profile image
Max Prilutskiy

yeah, html seems to be getting more and more sophisticated last couple of years!

Collapse
 
cscarlson profile image
cScarlson

Thank you for the article. HOWEVER, if you are going to write an article where #1 is the dialog element, please — PLEASE — also mention form[method="dialog"] + button[type="submit"]. I have 6 engineers I'm trying to get to use all these native goodies instead of pulling in a godforsaken library to do it, and they'll just read your article and wire up a godforsaken click event to a godforsaken span and write an element's layout rules in JS instead of CSS (reinvent the CSSOM) if you don't mention the real way to use this stuff. You've gotta remember that nowadays people think they can call themselves a frontend engineer when they know zero CSS, barely any HTML, not enough JavaScript, and no other frameworks but React. I blame the Bootcamps for the "6 figures in 6 weeks" marketing scheme that is an absolute scam.

Collapse
 
douiri profile image
Idriss Douiri

type="submit" is the default for buttons.

Collapse
 
jswhisperer profile image
Greg, The JavaScript Whisperer

I did not know this method=dialog very cool!

Collapse
 
maxprilutskiy profile image
Max Prilutskiy

yep! Native elements are becoming much more powerful, so i believe every developer should at least know they exist, before choosing older 3rd party libs that do the same!

Collapse
 
sebt13_54007bb6da4fcb22b0 profile image
Comment deleted
Collapse
 
cebulon profile image
Thomas Schroeder

Why do you promote a Philipine Restaurant?
That is a big, long website with their menu.

Collapse
 
dmitryabss profile image
dmitry-abss • Edited

Just to add: in Chrome, the summary element allows the accordion to automatically expand when using Cmd+F (or Ctrl+F), making hidden content searchable without any JavaScript. Unfortunately, Safari doesn’t support this behavior yet. Still, it’s a great feature for improving UX in documentation and FAQs!

Collapse
 
abhinavshinoy90 profile image
Abhinav Shinoy

Very useful! Thanks!

Collapse
 
maxprilutskiy profile image
Max Prilutskiy

happy to share! :)