5 HTML Tricks nobody tells you
author

Jon Snow

13 April 2023

5 HTML Tricks nobody tells you


1. Accept

The accept attribute is used to specify the type of files the user can upload. In following example, user can upload or use only .jpg or .raw files.

<input type="file" accept=" .jpg, .raw">

2. SpellCheck

The spellcheck is used to check spelling and grammer on html elements such as input.

<p spellcheck="true">
Hello World!
</p>

3. Translate

The translate attribute is used to tell the browser whether the content is to be translated or not. This can be translated into any language.

<p translate="no">
Hello World!
</p>



4. Poster

The poster attribute specifies an image to be shown while the video is downloading

<video src="" poster="any.png"></video>

5. Download

The download attribute is to instruct the browser to download a URL instead of navigating or the download attribute specifies that the target (the file specified in the href attribute) will be downloaded when a user clicks on the hyperlink.

<a href="" download></a>

Thank You 🧡🧡


Share:  
https://www.democoding.in/blog...

Related Post

programming meme
Code Snippet

Codepen Ideas