5 Common HTML Mistakes you should avoid.
Common HTML mistakes that web developers must avoid
Abhiraj Bhowmick
1. Semantic Header and Footer
Divs have no semantic structure. Instead of using divs to create headers or footer structures, use "header" and "footer" elements.
Don't do this
...
</div>
<div id="footer">
...
</div>
Do this
...
</header>
<footer>
...
</footer>
2. Use Figure Element
If you need to add a caption to your image, use the "figure" element combined with the "figcaption" element.
Don't do this
<p> Lorem Ipsum Description </p>
Do this
<img src="image url" alt="image description" />
<figcaption>
<p> Lorem Ipsum Description </p>
</figcaption>
</figure>
3. Don't use bold or italic tags
The "b" and "i" tags are presentational tags, and have no semantic meaning, instead either change the font-weight/font-style in the CSS or use the "strong" or "em" element.
Don't do this
<i>Italics</i>
Do this
<em>Italics</em>
4. Using descriptive links
A link’s text should be explicit and convey where is redirecting the user to, both users and search engines can more easily understand your content and how it relates to other pages.
Don't do this
Check our pricing...
</a>
Do this
5. Using inline styles
Writing inline styles violates the principle of having the structure (HTML) separate from the presentation (CSS). Instead write the styles in a stylesheet.
Don't do this
Header
</h1>
Do this
font-size: 24
}
Thanks for reading!!
Upvote
Abhiraj Bhowmick
I make stuff on the web and write blogs about it.

Related Articles