DEV Community

Cover image for 5 Powerful HTML Attributes That Don't Require JavaScript

5 Powerful HTML Attributes That Don't Require JavaScript

Ashish Patel on February 28, 2024

Certainly! Here's a refined version with code examples for each attribute: 1. Spellcheck: This attribute ensures that the browser checks spelling...
Collapse
 
andyjessop profile image
Andy Jessop • • Edited

Nice list! Also the Popover API is getting better support: developer.mozilla.org/en-US/docs/W... and can be used declaratively

<button popovertarget="mypopover">Toggle the popover</button>
<div id="mypopover" popover>Popover content</div>
Enter fullscreen mode Exit fullscreen mode
Collapse
 
sudouken profile image
Matthew •

Web Dev Simplified released a video demoing that six months ago. Pretty cool.

Collapse
 
ashishxcode profile image
Ashish Patel •

Yeah ❤️

Collapse
 
ashishxcode profile image
Ashish Patel •

Interesting, Thanks for sharing 💪

Collapse
 
manoarya profile image
Manohar Anand •

Amazing

Collapse
 
jackpwatson888 profile image
Jack Watson •

What a great post!!! Thanks.

Collapse
 
fpaghar profile image
Fatemeh Paghar •

Spellcheck: The example showcasing the spellcheck attribute in a textarea effectively demonstrates its utility for ensuring accurate spelling in user inputs without relying on JavaScript.

Autocomplete: The autocomplete attribute's role in controlling browser suggestions for input fields is effectively communicated through a clear example, emphasizing its potential to streamline user interactions.

Collapse
 
lunev profile image
Alexander •

WYSIWYG editors can ignore or remove empty download attributes. So, it would help if you used the following syntax:
<a href="/images/myw3schoolsimage.jpg" download="w3logo">

Collapse
 
ashishxcode profile image
Ashish Patel •

Thanks 👍

Collapse
 
sharmi2020 profile image
Sharmila kannan •

good work:)

Collapse
 
ashishxcode profile image
Ashish Patel •

Thank You :)

Collapse
 
samee-ullah profile image
Samee Ullah •

I like it, and I will use it in my project

Collapse
 
ashishxcode profile image
Ashish Patel •

Glad to Know that, Thank You :)

Collapse
 
officialphaqwasi profile image
Isaac Klutse •

Good work, this is my first time knowing this attributes thanks and keep the good work.

Collapse
 
ashishxcode profile image
Ashish Patel •

Glad to know that, I hope you use this in your day to day work. Thank You :)

Collapse
 
dieghard profile image
Diego Markiewicz •

Excelent! thanks

Collapse
 
pindelrio profile image
Pindelrio •

Great! Finally a download option easy. Thanks

Collapse
 
harshan68 profile image
Harshavardhan •

Cool, Will try to use when the requirement comes across.
Nice post 👌

Collapse
 
dyslab profile image
Vincent To •

Nice hints

Collapse
 
rooboo profile image
Robert •

This article directly comes from ChatGPT...

Collapse
 
ashishxcode profile image
Ashish Patel •

I've utilized the Claude AI to format this blog. It's a fantastic tool that streamlines the process and ensures consistency in formatting. Plus, it aligns perfectly with my goal of enhancing efficiency in content creation.

Collapse
 
miguelrodriguezp99 profile image
Miguel •

How cool! thank you