We regularly get users asking us questions about how to link to MDN, or even if doing so is allowed. The short answer is: yes, you can link to MDN! For guidelines and recommendations on best practices, read on!
Can I link to MDN?
Yes! Absolutely! Not only is the hypertext link the essence of the Web, it is both a way to point your users to valuable resources and a show of trust toward the work our community does.
So, yes, we definitely encourage you to link to content on MDN. Don't hesitate: link to MDN's front page, or, better, link deeply to a specific page on MDN, as appropriate. For best practices as to what page to link to, see below.
What page should I link to?
There is no specific page that you should link to. What's important is how relevant the page is to your readers.
- You may link to the MDN's main page, https://developer.mozilla.org/, if you're writing about MDN in general.
- You may link to a landing page: that is, a special page which serves as a table of contents or index about a specific topic area, if you're writing about that subject in general. A few common landing pages:
- HTML: https://developer.mozilla.org/en-US/docs/Web/HTML
- HTML5: https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5
- CSS: https://developer.mozilla.org/en-US/docs/Web/CSS
- CSS3: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS3
- DOM: https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model
- JavaScript: https://developer.mozilla.org/en-US/docs/Web/JavaScript
- You may link to a specific page if you're writing about a specific page, element, method, etc. For example:
- If you're writing about HTML elements, you might want to link to our index of all HTML elements (https://developer.mozilla.org/en-US/docs/Web/HTML/Element) or to a specific element like
<colgroup>
. - Similarly, if you're writing about CSS, you might choose to link to our CSS reference (a big index: https://developer.mozilla.org/en-US/docs/Web/CSS/Reference) or to a specific property you're writing about, like
list-style-type
.
- If you're writing about HTML elements, you might want to link to our index of all HTML elements (https://developer.mozilla.org/en-US/docs/Web/HTML/Element) or to a specific element like
But, really, you should link to the most appropriate page for your content and users. Don't forget, it's your reader that's important, not your link or us.
How do I create a good link?
Creating links is trivial, but good linking is somewhat more difficult. There are several way to do links:
Linking in the text
This is the most useful kind of linking: it is aimed at providing users with a link to further information about a given concept. Most of the time, such links connect users to pages that contain related information and not to the home page of the Web site (although there are certainly exceptions).
… by using the IndexedDB API, can store data in a local database…
Such links are very valuable for both the user, which has in-context information one click away with his mouse, and for MDN as this precise context brings us users very likely to like our content. Since our mission is for readers to find what they need as quickly as possible, this is obviously a good thing.
What not to do when linking in the text
Linking in the text is really nice and useful, but there are a few things to watch out for:
- Don't overlink. Do not link every word, or even almost every word. It's annoying. Choose carefully, and link only the main concepts of your text, or specifically choose to link to pages about concepts your reader is not likely to know about already.
- Don't link the same term over and over. If you're writing about CSS animations, you don't need to link every occurrence of the word "animation" to the
animation
CSS property. If the readers didn't know the concept, they will likely click on the first occurrence to get the relevant info. Later in the text, you can safely assume they already know about the concept, either before reading the page, or after following a previous link to the previous information. You might choose to link to the term occasionally (once every few paragraphs at most) so that if they later need to click over to the page, they don't have to scroll far. - Pay attention when linking in forums and blog comments. Giving a relevant link to a pertinent resource for a specific question or problem is great and often welcomed. Wandering the Web, spamming links to MDN is not appreciated: the site owners, and readers, will quickly identify you as a spammer and MDN's reputation will suffer. We are working hard to build a valuable resource and have no wish to see our efforts ruined by such behavior, so please only post relevant links at appropriate times.
Adding a banner or an image to your site
The other way to link to MDN is to add an image with a link outside the main text, for example in the sidebar. This has a different meaning: as much as linking in the text is a way to provide complimentary information to your user, adding an image link in the side bar is more a way to show your support to the MDN project, or a way to promote MDN. It's also a way to offer MDN as an overall resource for information.
Don't hesitate to show us your support: visit Promote MDN to build a button tailored for your site. You are of course free to link to a different page, like one of the landing pages.
Automatically linking to MDN from WordPress
We've created a WordPress plugin that automatically links select terms in your blog posts to the appropriate pages on MDN. It does so sanely, following the guidelines above, and can be a great help to bloggers writing about Web concepts. Give it a look, and consider installing it if you think it would be helpful.
Thank you very much for your support!
Cross-Origin Resource Sharing
Our intent is to enable CORS on all public data on MDN where it's safe to do so, which should include pretty much everything. If you find something that cannot be used with cross-origin requests, that's a bug to be fixed!