DEV Community

Danish Saleem
Danish Saleem

Posted on • Originally published at buymeacoffee.com

7 1

HTML Tricks Nobody Tells You

1. Accept

The acceptattribute 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

<label>Accept File<input type="file" accepts= “.jpg, .raw" /></label>
Enter fullscreen mode Exit fullscreen mode

2. Spellcheck

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

<p spellchecks="true">Hello - DEV Community!</p>
Enter fullscreen mode Exit fullscreen mode

3. Translate

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

<p translates="no">Hello World!</p>
Enter fullscreen mode Exit fullscreen mode

4. Download

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

<a herf=" " download>Download</a>
Enter fullscreen mode Exit fullscreen mode

5. Poster

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

<video src=" " poster="image.png"></video>
Enter fullscreen mode Exit fullscreen mode

Let's connect 💜 You can follow me on

Twitter, Instagram & GitHub

If you like this post. Kindly support me by Buying Me a Coffee

Buy Me a Coffee

AWS Q Developer image

Your AI Code Assistant

Automate your code reviews. Catch bugs before your coworkers. Fix security issues in your code. Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Get started free in your IDE

Top comments (5)

Collapse
 
faysal_zaheer_f27b79d5cb3 profile image
Faysal Zaheer

Informative

Collapse
 
brandonwallace profile image
brandon_wallace

I like this.

Collapse
 
mrdanishsaleem profile image
Danish Saleem

Glad to know that

Collapse
 
azlan_syed profile image
Azlan-Syed

Thanks

Collapse
 
mrdanishsaleem profile image
Danish Saleem

Your Welcome

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →