---
title: "Comment by Pankaj Patel on \"5 Common Mistakes to Avoid in HTML\" | Hashnode"
description: "Good tips for br in p I would like to add one suggestion on a , try to avoid using target=_blank as it breaks the flow of browsing way more than use of # In gen"
url: "https://hashnode.com/posts/5-common-mistakes-to-avoid-in-html/5f4be7063a844e5996537904/comment/5f4cbbdf96b55f6819b7df6b"
---

[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)

[Pankaj Patel](https://hashnode.com/@pankajpatel)

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

Good tips for `br` in `p`

I would like to add one suggestion on `a`, try to avoid using `target=_blank` as it breaks the flow of browsing way more than use of `#`

In general, like you said, if you need to use only `#` fro href, try to use `button` but it is useful as jump to top of page can just be achieved by using `#` as `href`

Buttons need more style resets than links and probably that's why I would go for using `a[href="#"]` as having click handlers on text nodes is less recommended

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

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

Agree, use `target=_blank` only where needed.  
I would consider "jump to the top of the page" as navigation as we are actually navigating the user to the top of the page. Just make sure you take care of "open in new tab" functionality.  
A lot of user does right-click and click something from the menu like copy this link or open in new window/tab. That should not break the functionality.

A clickable item can either navigate the user or do some action. If the behavior is not among these or contains both, we probably need to check the UX if it's correct.

[Pankaj Patel](https://hashnode.com/@pankajpatel)

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

Personally, I take the thumb rule of "if it looks like link, make it behave as link"

Rest should behave as button.

And when making a button, there are multiple ways to do it.

There are various kind of users and one natural instinct for a user is that if it looks like link, they might try to open in new tab. But that is also vary small percentage of users. Normally the non-tech users will browse in a natural flow where app can guide them in a natural flow.

I personally am a heavy user of open in new tab and I have 4-5 windows with at-least 20 tabs in each. I hate my habit of doing this but yeah it happens.

UX is very tricky thing around this and there is no blanket statement to cover this kind of experience. Every use-case is different and need to be handled with specific Usability Testings

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

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

[Pankaj Patel](https://hashnode.com/@pankajpatel) Makes sense
