In this link from CSS-Tricks, it's claimed that using the hash sign in a URL for linkablity purposes is not a good idea, because browsers will scroll to the item which has its id mentioned in the fragment identifier, so that the intended element is located at the top of the screen.

I wondered if it's a bad experience for users or not? Does anyone know anything about it? Any kind of reference to research is highly appreciated.

My personal view is that, it's not bad. Because if it was bad, browsers wouldn't implement it.

  • The CSS tricks article was specifically talking about a component with tabs, and not about URL fragments in general.
    – Flimm
    Dec 9, 2021 at 11:03

1 Answer 1


Depends how you define "bad user experience" I suppose. The hash identifier allows you to link directly to the information that the user wants to see or you want them to see; what could be better than that?

The issue is how you do that, skipping down the page is a very simple effect that works in all possible cases, and requires no reformatting of content. It does introduce an annoying visual effect as you start at the top of the page and wait for the page to load before it skips you to what you were linked to; on a slow connection this can be confusing or frustrating.

However this is mostly a technical/implementation problem, as most pages don't have the advanced CSS work required to have the linkable tabs, and a great deal of layouts wouldn't allow for them at all; anything laid out long enough to appear "below the fold" will never be able to use this particular CSS trick. We could reformat the whole internet so all pages look identical so this linking method would always work, but what sort of user experience would that be?

Also--"If it was bad, browsers wouldn't implement it." Browsers are very much living applications and HTML is a living language, what you can do changes all the time partly because some things were bad ideas (marquee anyone?), some things were implemented poorly (see IE's famous abuse of the alt attribute) and sometimes needed features were lacking (various HTML5 form elements). "It's done so it much be good" is never a good attitude to take, always question why it's done and how it could be done better!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.