---
title: "Comment by Dinys Monvoisin on \"5 Common Mistakes to Avoid in HTML\" | Hashnode"
description: "Using &lt;div&gt; tag to write add a piece of text to your webpage, is a valid case when to use &lt;div&gt;?"
url: "https://hashnode.com/posts/5-common-mistakes-to-avoid-in-html/5f4be7063a844e5996537904/comment/5f4cc7d25c2aa067f8075a36"
---

[Discussion](https://hashnode.com/posts/5-common-mistakes-to-avoid-in-html/5f4be7063a844e5996537904)

Comment [5 Common Mistakes to Avoid in HTML](https://hashnode.com/posts/5-common-mistakes-to-avoid-in-html/5f4be7063a844e5996537904)

[Dinys Monvoisin](https://hashnode.com/@dinmon)

[Aug 31, 2020](https://hashnode.com/posts/5-common-mistakes-to-avoid-in-html/5f4be7063a844e5996537904/comment/5f4cc7d25c2aa067f8075a36)

Using <div> tag to write add a piece of text to your webpage, is a valid case when to use <div>?

[Shad Mirza](https://hashnode.com/@iamshadmirza)

[Aug 31, 2020](https://hashnode.com/posts/5-common-mistakes-to-avoid-in-html/5f4be7063a844e5996537904/comment/5f4cc7d25c2aa067f8075a36#reply-5f4cca345c2aa067f8075a70)

Semantically, you should use div when nothing else makes sense.  
If you just want to group few elements together and it doesn't make sense to use section, header, footer, main, aside, article, nav, etc then go for div.  
Never ever add a text inside a div and use click handler to behave like a button. A div is a container of another item and it should do that only.
