Menu Search
Jump to the content X X
Smashing Conf New York

We use ad-blockers as well, you know. We gotta keep those servers running though. Did you know that we publish useful books and run friendly conferences — crafted for pros like yourself? E.g. upcoming SmashingConf Barcelona, dedicated to smart front-end techniques and design patterns.

A Short Story About “Back To Top” Links

Often it is the close attention to small details that makes a design outstanding. During the development of a website, designers tend to quickly forget about small details and focus on major design elements, such as navigation, typography and layout. If done properly, the result is usually a solid, impressive and highly professional design that communicates information. However, it is not memorable. The reason is that such designs often do not have a memorable voice: they may look visually appealing, but they don’t provide a vivid anchor for users to remember a website after leaving it.

In this way, little details are important because they can help the design stand out. Have you ever thought about the design of your shopping cart? What about the design of tags, date stamps, “Previous” and “Next” links? All of these small details are not crucial for website navigation, but they add up to a more user-friendly, more convenient and sometimes also more sophisticated design. And this is why we have focused the attention of our readers on such things as image captions1, block quotes2, date stamps3, shopping carts4, pagination5, <hr> lines6, tag clouds7 and favicons8.

Screenshot - Top Link20910

In this post, we showcase the design of “Back to top” links, a forgotten and rarely used link that helps users jump to the top of a given page. A visitor can achieve this effect by pressing the “Home” button on his or her keyboard; however, not every user is aware of that shortcut, and most probably use the vertical scroll bar in the browser for that purpose. As designers, we can help our users out by adding a stand-alone “top” link to our designs.

Unfortunately, this friendly service — letting users jump to the top of the page — is offered very rarely. Most designers don’t include it, which is why it took us over 5 weeks to collect at least a few dozen nice examples for this post.

In fact, “Back to top” links are not always useful. For example, they may be unnecessary for websites that have rather short pages or articles. In such cases, there is no need for users to jump to the head of the page, because the whole page is completely visible anyway; if a “top” link is included on such pages, clicking on it will produce no effect, which is rather irritating. This is another reason why many designers don’t use it: the variety of currently available screen resolutions makes the “top” link unusable and unnecessary. That’s why using “Back to top” links for rather short pages is not a good idea.

However, websites with long pages can offer visitors a nifty feature that saves time and avoids the need for vertical scrolling with the mouse.

The most obvious and common place for a “Back to top” link is the footer. This is where it belongs and should be placed. We weren’t able to identify a common design scheme for the alignment of the “Back to top” link. Some designers place it on the left side of the footer, others place it in the middle and yet others put it on the right side of the footer. It is also very common to place the “top” link on the left-hand side of the content area, directly under the article.

Screenshot - Top Link11
Meet the friendly “top” link: it is often placed in the footer of the page and almost always appears very modest and almost bashful.

“Back to top” links are also often used in FAQs, help sections and site maps, where they help divide chapters or paragraphs and provide users with a quick way to jump to the beginning of the page, where the main navigation is placed.

To point the link to the top of the page, in most cases it is enough to define an empty anchor and put it right after the <body> tag:

<div id="footer">
<!-- footer goes here -->

<a href="#">top</a>

</div>

However, older browsers and, in particular, legacy browsers have problems interpreting this markup. An alternate solution is to use a real anchor that is explicitly defined and placed right after the <body> tag:

<body>

	<a name="top"></a>
	
	<!-- content goes here -->
	
	<a href="#top">top</a>
	
</body>

Update: another method that avoids unnecessary markup and therefore should be preferred is to use the ID of the wrapper or header for the same purpose. For instance, if you use the div-container with the ID “wrapper”, you may use the following markup:

<body>
	<div id="wrapper">
	
	<!-- content goes here -->
	
	<a href="#wrapper">back to top</a>

	</div>
</body>

Of course, the link itself doesn’t have to be text; it can also be an image, a button or any other element of your choice (using images may have some usability issues — see below).

Wording Link

Never mind what phrase you actually use: you just need to make sure that visitors understand the function of the link and aren’t irritated by it. For instance, it’s probably not a good idea to use the word “Return” because it is not immediately clear if the user will be taken to the home page, the previous page in the browser’s history or the top of the page.

Screenshot - Top Link12

Use clear and concise terms, such as “Go to top,” “Back to top,” “Return to top” or “Jump to top.” Sometimes a harmless “Up” is used. However, we’re not sure if that’s actually a good idea. Probably not.

Problems and Disadvantages Link

Some usability experts and even the Yoda of usability, Jakob Nielsen, reject the “top” link13 unanimously. According to them, in-page links should be avoided at all because the scroll bar suffices completely, and additional options can be irritating and unnecessary. However, they agree that “Back to top” links may be useful if pages are extremely long, which should be avoided anyway.

One major problem with “top” links is that they have an impact on the browser’s navigation buttons and as such pollute the browsing history. Because “top” links are anchors just like any other links, clicking on the browser’s “Back” button will take users to the foot of the page they are currently viewing, not to the previous page. On top of that, accessibility experts claim that “Back to top” links may disrupt the use of speech-based user agents, that the “top” concept is vague and that “Back to top” links are not used consistently across websites.

In our search for interesting “Back to top” examples, we stumbled across some solutions in which designers used images to allow users to jump to the top of the page. However, it is worth mentioning that images should make it clear to users that the link leads not to the home page of the website but to the top of the page. “Home links” are not “Back to top” links, and “Back to top” links are not “Home links”. If you decide to use such links in your design, make sure that visitors can understand the difference immediately.

Screenshot - Top Link14

Mistake: “Home” instead of “top”

Screenshot - Top Link15
Home, sweet home…

Screenshot - Top Link
Back to the home page in Spanish

Screenshot - Top Link16
Another “home” example in the footer.

Screenshot - Top Link17
The icon on the right-hand side is not clickable: it could be used to lead to the home page, but not the top of the page.

Screenshot - Top Link
Same here: the illustration is not clickable.

Screenshot - Top Link
And here, too.

Here are some more examples of “Back to top” links. It took a while to collect them. Hopefully, they’ll serve as a good source of inspiration for some of our readers.

Screenshot - Top Link18

Screenshot - Top Link19

Screenshot - Top Link209

Screenshot - Top Link21
An animated “Back to top” link

Screenshot - Top Link22

Screenshot - Top Link23

Screenshot - Top Link24

Screenshot - Top Link25

Screenshot - Top Link26

Screenshot - Top Link27
A link as part of the navigation. Looks good but may be a little irritating at first glance.

Screenshot - Top Link28
The “top” icon here follows the scroll bar vertically.

Screenshot - Top Link29

Screenshot - Top Link30

Screenshot - Top Link31

Screenshot - Top Link32

Screenshot - Top Link33
We don’t know why the remote control is placed there: it is not clickable, but it could be.

Screenshot - Top Link34

Screenshot - Top Link

Screenshot - Top Link35

Screenshot - Top Link36

Screenshot - Top Link37

Screenshot - Top Link38

Screenshot - Top Link39

Screenshot - Top Link40

Sources and Resources Link

(al)

Footnotes Link

  1. 1 https://www.smashingmagazine.com/2008/11/04/image-caption-design-simply-elegant-or-boldly-graphic/
  2. 2 https://www.smashingmagazine.com/2008/06/12/block-quotes-and-pull-quotes-examples-and-good-practices/
  3. 3 https://www.smashingmagazine.com/2008/02/22/gallery-of-date-stamps-and-calendars/
  4. 4 https://www.smashingmagazine.com/2008/02/07/shopping-carts-gallery-examples-and-good-practices/
  5. 5 https://www.smashingmagazine.com/2007/11/16/pagination-gallery-examples-and-good-practices/
  6. 6 https://www.smashingmagazine.com/2008/08/22/the-hr-contest/
  7. 7 https://www.smashingmagazine.com/2007/11/07/tag-clouds-gallery-examples-and-good-practices/
  8. 8 https://www.smashingmagazine.com/2008/11/20/favicons-episode-8/
  9. 9 http://www.dawghousedesignstudio.com/
  10. 10 http://www.thegregbradyproject.com/
  11. 11 http://www.wannabegirl.org/
  12. 12 http://www.webleeddesign.com/
  13. 13 http://www.cs.tut.fi/~jkorpela/www/totop.html
  14. 14 http://www.taptaptap.com/blog/
  15. 15 http://www.reallywildtravel.com/what-is-a-challenge-event.html
  16. 16 http://www.lucyblackmore.co.uk/
  17. 17 http://www.fuelyourcreativity.com/
  18. 18 http://www.subdued.net/
  19. 19 http://www.chigarden.com/
  20. 20 http://www.dawghousedesignstudio.com/
  21. 21 http://moustacheme.com/
  22. 22 http://taufiq-ridha.co.cc/
  23. 23 http://www.decatur-airport.org
  24. 24 http://www.dcresource.com/
  25. 25 http://www.zufanek.cz/
  26. 26 http://www.thegregbradyproject.com/
  27. 27 http://www.hebatec.de/
  28. 28 http://www.nue-media.com/
  29. 29 http://slydial.com/
  30. 30 http://www.jeffsarmiento.com/
  31. 31 http://www.thecssgallerylist.com/
  32. 32 http://www.incayellow.com/
  33. 33 http://www.loodo.com.br/
  34. 34 http://www.cooper.com/about/process/
  35. 35 http://ilovetypography.com/
  36. 36 http://www.albertlo.com/
  37. 37 http://gapersblock.com/
  38. 38 http://www.designworkplan.com/
  39. 39 http://www.bainbridgestudios.com/
  40. 40 http://www.olliekav.com/
  41. 41 http://green-beast.com/blog/?p=177
  42. 42 http://www.useit.com/alertbox/within_page_links_comments.html
SmashingConf New York

Hold on, Tiger! Thank you for reading the article. Did you know that we also publish printed books and run friendly conferences – crafted for pros like you? Like SmashingConf Barcelona, on October 25–26, with smart design patterns and front-end techniques.

↑ Back to top Tweet itShare on Facebook

Sven is the co-founder and former CEO of Smashing Magazine. He's now writing at his Conterest Blog, where he focuses on blogs, content strategy and publishing — all in German.

  1. 1

    Curt Simon Harlinghausen

    November 27, 2008 4:17 pm

    I love it. Another genius article.
    You guys are doing a great job.

    0
  2. 2

    Isn’t that method deprecated in favor of id=”top” in the header (or body in the example listed there).

    -1
  3. 3

    Does anyone else see the irony in this post. SM doesnt have a back to top link ;) Nice post all the same.

    2
  4. 4
  5. 5

    Nice article, but I never use that function…

    0
  6. 6

    having a “back at top” link is useful especially for websites that tends to have lenghty entries. Yes the scrollbar is enough or the mouse scroll is useful, but if you are leaning to a responsive website, it should be included to give consideration to the fact that the website will be lengthy.

    0
  7. 7

    Vitaly Friedman & Sven Lennartz

    November 27, 2008 4:54 pm

    @sryo (#4): we are not sure about that. Body-elements typically have an ID anyway and it is not really correct to just give them the ID “top”. And if you have a header-container, then it already has the ID “header”. And it is definitely not a good idea to just add some empty div-container with the ID “top”. Therefore, in our opinion, it is a better idea to use a simple link instead.

    0
  8. 8

    I stand corrected, although I still believe adding an empty tags like (or “anorexic anchors” according to Tantek) should be avoided.

    0
  9. 9

    Ten minutes ago I was just deciding on whether to use a “back to top” link since I look for it on other websites quite frequently. I’m glad I happened to read this post. Crazy timing. I actually prefer to scroll down instead of clicking “next page” 5 times for a long article so I’ll probably be implementing this in my new site design. Now I have a few ideas for inspiration!

    0
  10. 10

    Regarding the code – I usually use the header container (or body, or anything else that is already present in the layout), and use the code: <a href=”#header”> Back to Top </a>
    There is no need to create additional element if you can use the one you already already have.

    0
  11. 11

    I was shocked to see an article on using using fragment identifiers (which is what these are) because so few people use them anymore. However my shock turned to disappointment when you implied they should go to empty "anchor" tags with "name" attributes.

    This document claims to be XHTML™ 1.0 Transitional (not that it’s even close to valid) so you should be using "id" on elements with semantic meaning. Not attributes not "name" attributes on "anchor" elements, which are deprecated in XHTML™ 1.0 and higher. Even the HTML™ 4 specification indicates the use of the "id" attribute, but allows the "name" attribute to continue being used for compatibility. However even in HTML™ 4 the value of "name" attributes must follow the same rules as the "id" attribute with which they share a namespace. I would also add that this document has multiple elements with identical "name" attributes on elements for which they are not allowed.

    Please observe this reliable link to a "div" element with an "id" attribute in this document, even though there is no "anchor" tag with a "name" attribute of "comments".

    <a title="View comments" href="https://www.smashingmagazine.com/2008/11/27/short-story-about-top-links/#comments">This link will take you to the comments</a>

    For official and accurate information on this topic please see "XHTML™ 1.0 The Extensible HyperText Markup Language (Second Edition)" Section C "HTML Compatibility Guidelines" Subsection 8 "Fragment Identifiers" on the W3C® website at http://www.w3.org/TR/xhtml1/guidelines.html#C_8 Which I have not linked to because the preview of this comment indicated it was going to alter the markup I had entered and create a link which contained an erroneous right double quotation mark inside of the "anchor" tag’s "href" attribute.

    0
  12. 12

    Nice post… Thanks Smashing!

    0
  13. 13

    Nicolás Sanguinetti

    November 27, 2008 7:12 pm

    My take on this is to have a semi-transparent link that remains fixed on bottom *of the viewport* (not the page) and scrolls with the user. For extremely long pages — and particularly pages that make you jump a lot, like FAQs — this ends up being extremely useful, since you always have a “Back to top” link, and it’s only one, and you always know where to find it.

    Using some javascript magic, we can even remove the href=”#top” from the link, removing the navigational obstacle cited as a deficiency of these sort of links, and just scrollTo(0, 0) when someone clicks the “link”.

    An ex coworker of mine has detailed the thought process we did when designing Operator11 (regrettably the site has been taken down, but in the aforementioned blog you can get a zip with example source code.)

    0
  14. 14

    Nicolás Sanguinetti

    November 27, 2008 7:13 pm

    Er let me thank the “smart” script that replaced the content of my link with “Link”… =)

    That should read: “An ex coworker of mine has detailed the steps we followed for the back to top link when designing Operator11″…

    0
  15. 15

    Klaye Morrison

    November 27, 2008 7:20 pm

    Sweet! When I read the title I was wondering “Are they going to include the CSS Gallery List?” Cheers for the inclusion :)

    0
  16. 16

    Although the anchor method is the most widely used, I prefer utilizing javascript. Not only do you not have to worry about extra tags making your code messy, but navigation isn’t disrupted and it works with both IE and FF. The code I throw into a “href” tag is..

    javascript:scrollTo(0,0)

    Check it out.

    0
  17. 17

    mydelivery.com.au has a nice java animation that takes the user back to the top.

    0
  18. 18

    Smashing Magazine’s long pages don’t have a “top” link here at the bottom…

    0
  19. 19

    “Some usability experts and even the Yoda of usability, Jakob Nielsen, reject the “top” link unanimously.”

    Interesting article, highlighting how harmful ‘Back to Top’ links can be – I enjoyed the inclusion of ‘Start of Page’ links, particularly the one 6 lines from the top of the page. However, I found I was confused by what they meant – start of which page? The page of my book? The page of my newspaper? The Google home page?

    Having never come across ‘Start of Page’ links before (I’m more familiar with ‘Back to Top’ links), I am confounded as to their purpose…. blah blah blah…

    Yes, enough with the usability crap already! The author of the ““Back to Top” links considered harmful” article assumes that web users, especially those with assistive technologies, are idiots. He also lists the print issue with these links as a reason not to use them “you can use CSS to prevent this, but most authors don’t do that.” – but authors should. This is not a reason to ignore the links as a useful tool.

    ““Back to Top” links are not consistent across sites, in appearance or details of functionality.”. The same could be said of all navigational elements – how many websites construct their navigation in the same way, or styles their links to look the same as everyone else’s?

    “Back to Top” links also disturb the use of speech-based user agents. Would you like to listen to a page, using a speech synthesizer, if there were an abrupt note like “link: back to top” e.g. after each paragraph? Such user agents often have a link reading mode where only links are spoken, in sequential order.”. So why have you used them (or a version of them) in your article, you cretin?

    “If you use “Back to Top” links, the following is a reasonably harmless method…” – So, after all that, you give an example of a ‘reasonably harmless’ method? Your article is therefore a complete waste of a readers time, and I’m offended by the time I wasted reading it.

    I get really pissed at ‘Usability Experts’ spouting self-righteous crap that has no place in the real world. Get over yourselves, you pompous imbeciles.

    Smashing Magazine – great article.

    1
  20. 20

    Yes! Smashing Magazine needs a top link…

    0

↑ Back to top