Home  >  Article  >  Web Front-end  >  Share 8 Shocking HTML Tips

Share 8 Shocking HTML Tips

藏色散人
藏色散人forward
2023-04-12 15:34:541908browse

This article brings you relevant knowledge about HTML. It mainly shares 8 HTML skills with you. Friends who are interested can take a look below. I hope it will be helpful to everyone.

Share 8 Shocking HTML Tips

1. Capture attribute to open your device camera

Just like the input tag has email, text and password attributes, there is also an attribute to open the mobile device camera to capture images.

This is done through the capture attribute, which can have two values:

  • Front camera user
  • Rear camera environment

2. Website auto-refresh

You can set your website to refresh after a given time, starting from the beginning tag!


    

This snippet refreshes the site every 10 seconds

3. Activate spellcheck

You can activate it using the HTML spellcheck attribute and setting it to true. Specify the language using the lang attribute

It is a standard attribute and most browsers support it

browser support pic

4. Specify File types to upload

You can use the accept attribute to specify the file types the user is allowed to upload in the input tag

5. Prevent translation

Set the translate attribute to no , to prevent translation. This is important in case there is a phrase or word that you don't want translated, such as your logo, company or brand name.

Brand name

6. Enter multiple entries in the input tag

This can be done with multiple attributes

It works for files and emails. For email, separate each email with a comma.

7. Create a poster (thumbnail) for your video

With the poster attribute, you can create an image that displays when the video downloads, or until the user clicks the play button.

If this is not included, the first frame of the video will be used instead.

8. Click the link to download automatically

If you want to download a specific resource when you click the link pointing to the target resource, please add the download attribute

Conclusion

Then my 8 shocking HTML skills that you may not know are over. The purpose of the article is actually very simple, which is to summarize and output of daily work, Output something that I think is useful to everyone. It doesn’t matter if is a dish or not, but I love . I hope everyone likes my article. I really write it with my heart, and I also hope to get to know more like-minded friends through the article. ~

The above is the detailed content of Share 8 Shocking HTML Tips. For more information, please follow other related articles on the PHP Chinese website!