HTML tips you won't see in most tutorials.

🧵
1. The `loading=lazy` attribute

You can use the `loading=lazy` attribute to defer the loading of the image until the user scrolls to them. <img src='image.jpg' loading='lazy' alt='Alternative Text'>
2. Use the `<datalist>` element to create native HTML autocomplete. Codepen preview.  HTML code:   <div class="wrapper"
3. Email, call, and SMS links: <a href="mailto:{email}?subject={subject}&body={content
4. Ordered lists `start` attribute.

Use the `start` attribute to change the starting point for your ordered lists. Code:  <ol start="11">   <li>HTML</li>   <li>CSS</
5. Use `<input type="reset">` to create clear button for your forms. Codepen preview.  Title: Reset Form HTML: <form>   <label fo
6. The `meter` element

You can use the `<meter>` element to display quantities. No JavaScript/CSS is needed. <label for="value1">Low</label> <meter id="va
7. `window.opener`

Pages opened with `target="_blank"` allow the new page to access the original’s `window.opener`. This can have security and performance implications. Include `rel="noopener"` or `rel="noreferrer"` to prevent this.  <a href="https://markodenic.com/" target="_b
8. Base Element

If you want to open all links in the document in a new tab, you can use <base> element: <head>   <base target="_blank"> </head> ... <!-- T
9. Favicon cache busting

To refresh your website’s favicon you can force browsers to download a new version by adding ?v=2 to the filename.

This is especially helpful in production to make sure the users get the new version. <link rel="icon" href="/favicon.ico?v=2"
10. Native HTML sliders

You can use `<input type="range">` to create sliders. <label for="volume">Volume: </label> <input type=&
11. HTML Accordion

You can use the `details` element to create a native HTML accordion. <details>   <summary>     Click me to see more details   </s
12. `mark` tag

You can use the `<mark>` tag to highlight text. <p>Don't forget to be <mark>awesome</mark> today.</p>
13. Use the `type="search"` for your search inputs and you get the "clear" button for free. Codepen preview.   HTML code: <form>   <label for="text
14. `download` attribute

You can use the `download` attribute in your links to download the file instead of navigating to it. <a href='path/to/file' download>   Download </a>
15. Performance tip

Use the `.webp` image format to make images smaller and boost the performance of your website. <picture>   <!-- load .webp image if supported -->   <source
16. Use the `poster` attribute to specify an image to be shown while the video is downloading, or until the user hits the play button. <video poster="path/to/image">
17. Use the `spellcheck` attribute to define whether the element may be checked for spelling errors. In this image, I show examples of elements with spellcheck a
18. Use the `<optgroup>` element to create a grouping of options within a `<select>` element. The image consists of the preview of the HTML code. Code: <l
19. You can use the `<fieldset>` element to group several controls as well as labels (`<label>`) within a web form. <form>   <fieldset>     <legend>Choose your favorite languag
If you're learning HTML, CSS or JavaScript be sure to follow me and never miss tips like this.

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Marko ⚡ Denic

Marko ⚡ Denic Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @denicmarko

29 Sep
Useful websites for web developers.

🧵
1. Sidebar (@SidebarIO)

The five best design links, every weekday.

Link: sidebar.io
2. Public APIs (@publicapis)

A collective list of more than 1000 Free Public and Open REST APIs for developers.

LInk: public-apis.io
Read 9 tweets
22 Sep
Useful websites for web developers.

🧵
1. Vercel (@vercel)

Deploy web projects with the best frontend developer experience and highest end-user performance.

Link: vercel.com
2. UI Garage (@uigarage)

Daily handpicked UI inspiration & patterns.

Link: uigarage.net
Read 9 tweets
8 Sep
Youtube channels to learn Web Development.

🧵
1. Traversy Media (@traversymedia)

Traversy Media features the best online web development and programming tutorials for all of the latest web technologies.

Link: youtube.com/c/TraversyMedia
2. FreeCodeCamp (@freeCodeCamp)

Learn to code — for free.

Link: youtube.com/c/Freecodecamp
Read 14 tweets
6 Sep
Googling is one of the most important skills for every developer. Here are 10 tips to Google efficiently!

🧵
1. Use quotes to force an exact-match search:

"what is javascript" Google search exact match  example.
2. AND operator will return only results related to both terms:

html AND css Google search with AND keyword.
Read 13 tweets
5 Sep
HTML tip:

Use the `start` attribute to change the starting point for your ordered lists. Code:  <ol start="11">   <li>HTML</li>   <li>CSS</
If you're learning HTML, CSS or JavaScript be sure to follow me and never miss tips like this.
You can find more HTML tips here.

markodenic.com/html-tips/
Read 4 tweets
4 Sep
Useful websites for web developers.

🧵
1. Lineicons (by @MusharofChy)

Handcrafted Free Line Icons for Modern User Interfaces of Web, Mobile, and Desktop App Design & Development Projects.

Link: lineicons.com
2. Colorion (by @csaba_kissi)

Curated Color Palettes with Search and Tags Support

Link: colorion.co
Read 9 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!

:(