DEV Community

Cover image for HTML can do that?
Ananya Neogi
Ananya Neogi

Posted on

HTML can do that?

After witnessing some awesome things CSS can do, it's time for HTML to come in the same spotlight!

It's amazing that you can do so much with just HTML.

1. Dropdown with searchable text


2. Dialog box


3. Measuring progress

Styling this is not an easy task, I agree! But there's always some workaround and it's nicely explained here - How to style progress element


4. Expand/collapse details


5. Show correct mobile keypad based on input type


6. Add a simple colour picker


7. Highlight text


8. Create a direct phone number link

Similar to email link with mailto we can also create a direct phone number link.

<a href="tel:+917272727272">+91-7272727272</a>
Enter fullscreen mode Exit fullscreen mode

9. Show deletion and insertion of text


10. Edit page contents

Wish to make your own browser editor? You can do that too - How to make browser editor with html.


Note: Not all browsers have implemented these elements and attributes. But we can still use these today with progressive enhancements! 🙂

HTML is the foundation of any webpage, it's only wise to pay real good attention to it. Semantic markup not only helps in SEO but also helps in accessibility.

If you've come across any such cool thing HTML is capable of, please mention below 😀


In other news, I made a silly project : https://hp-ipsum.netlify.com

Follow me on twitter @_ananyaneogi to get more tidbits 😊

Latest comments (135)

Collapse
 
ishanpro profile image
Ishan Tiwari

Where is the kbd tag

Collapse
 
mafee6 profile image
MAFEE7

WEB DEV SIMPLIFIED

Collapse
 
toqeer__abbas profile image
Toqeer Abbas

Nice

Collapse
 
tominekan profile image
Tomi Adenekan

Internet Explorer be like 😮

Collapse
 
christiangroeber profile image
Christian Gröber

The only one from that list I knew was the one. Though that one does not work properly in edge. But no surprise there, really

Collapse
 
unrasend profile image
Vlad Luchkov

Detail tag with open attr lacks support in browser(~50% of users)
Progress - extremely hard to style to support all browsers with animation.
Dialog - 70% of users support

Collapse
 
teamallnighter profile image
Chris Connelly

Great post

Collapse
 
_omggamer_ profile image
Omggamer

One of the best articles I have read!
Omggamer

Collapse
 
de_nien profile image
Nienke

Cool!
And 👏👏👏👏 for hp-ipsum!

Collapse
 
damlight profile image
Daei_F

This is very interesting. I can do some implementations of these with animations using a smart combination of HTML inputs combined with CSS. I think HTML/CSS can still go beyond, there are things for which JS was not necessary anymore and yet it's the norm.

Good article :D

Collapse
 
originalankit profile image
OriginalAnkit

Thank you

Collapse
 
alexander_32 profile image
Alexander-- • Edited

Nice article! I think, that it misses an important technique, that uses checkboxes and :checked selector to approximate interactive elements.

Checkboxes and radio buttons can be used to create tabs, expandable areas, dialogs and other complex interactive controls without using Javascript. They are a lot more flexible and have better cross-browser compatibility than "dialog" and "summary".

Collapse
 
narenkram profile image
Narendra Ram

❤ Thank you. Did not know about

Collapse
 
craftyminer1971 profile image
CraftyMiner1971

Your 'silly project' can come in handy if you want an alternative to the regular ipsum text that's so common. It's still worthy of a bookmark, though. :)

Collapse
 
dan503 profile image
Daniel Tonon

If you've come across any such cool thing HTML is capable of, please mention below 😀

<input type="time"/>

Makes entering time values consistent and also easier on mobile.

I built a polyfill for it as well so that there is no reason not to use it 😁
dan503.github.io/time-input-polyfill/

Some comments may only be visible to logged-in visitors. Sign in to view all comments.