Purpose
Hyperlinks, or simply links, are the building blocks of any website, as they help to create a relationship between different resources (e. g. webpages). There are three main types of links:
- a general link points to the homepage of an external website and generally has a low informational value, as the user is obliged to navigate from the next homepage to the information they are looking for
- a deep link points to a specific page on an external website and is generally good for usability, as the user can find specific information without having to navigate through another website. The drawback is that deep links are more likely to be changed or removed by the website's owner, thus generating a page not found error. Certain services of the European institutions follow specific rules to generate their links
- an inline link loads an external resource, often an image, in the current page
Guidelines
Here are best practices to follow for links.
- always ensure that the target page exists and is accessible
- avoid using javascript to generate links or to rewrite URLs
- always specify the context of the link
- if it's a textual link, avoid meaningless phrases like "click here" or "learn more". Instead use a short description of the resource to which you are linking. You can always combine the two (e.g. "Learn more about this important European topic")
- if it's an image link, make sure to fill the alternative text (alt attribute) with meaningful information. This will be used by search engine crawlers and screen readers, helping visually-impaired people to understand your page better. If the language of the alt text is different to the language of the page, this has to be indicated by using the correct language attribute on the image tag itself (e.g. The event will be located in <img src='piazza-roma.jpg' alt='piazza di spagna Roma' lang='it'>). If you are using a CMS, this step is usually taken care of by the system automatically
Please note: while studies show that links in a text may distract users from the information and would read better at the end of a paragraph, links embedded in a paragraph send useful, additional contextual information to search engine crawlers. Please bear this in mind and balance usability and search engine optimisation (SEO) when adding links to your text.
- link lists are acceptable as long as their labels are meaningful
- always specify, with an icon or a label, that the link
- points to an external site (i.e. a website not under the europa.eu domain). Failure to comply with this point may have legal repercussions
- points to a resource in a language different to the current one
- points to a resource other than a web page (e.g. PDF)
- if you are working with a CMS, please make sure that internal links are created using the CMS's specific feature. This way, every time the URL of the target page is changed, the link will be regenerated automatically
- avoid inline links, as they represent a security risk (the linking website has no control over the linked resource, which might be changed at any time) or legal issues (e. g. copyright infringement)
Contact and support
Need further assistance on this topic? Please contact the team in charge of Europa Domain Management (EU Login required).