Skip to content, sitemap or skip to search.

Personal tools
Join now
You are here: Home Blogs Licensing Make your site LibreJS-friendly and HTML5-valid with rel=jslicense attribute

Make your site LibreJS-friendly and HTML5-valid with rel=jslicense attribute

by Joshua Gay Contributions Published on Aug 17, 2015 01:17 PM
With listing the jslicense rel attribute value as a proposed HTML5 link type extension, sites can now have LibreJS-friendly links to JavaScript License Web Labels pages without throwing HTML5 validation errors.

In 2012 the FSF published human- and machine-readable recommendations for labeling the license and source information for JavaScript (JS) programs on the Web. In addition to recommending the use of license and source tags for comment fields, we also encourage sites to maintain a single page of JavaScript License Web Labels, which contains a table with three columns with links to the (minified) JS file used on a given page, the license of that JS program, and the source code of that program. On each page that uses JavaScript, we encourage people to include a link to the labels page, and within the HTML link, to make use of a machine-readable attribute/value combination of rel="jslicense". For example, the footer of has the following HTML:

<a href="" rel="jslicense">JavaScript Licenses</a></pre>

The rel="jslicense" attribute allows tools, such as GNU LibreJS, to know where to find the labels page to determine if each JS file being served is free software, and if it is, then to allow your browser to download and run that program.

Unfortunately, when we first published our web labels recommendation, one problem web developers encountered was the fact that rel="jslicense" attribute was not considered "valid" HTML5, and so tools such as W3C's Markup Validation Service would return an error stating that the rel="jslicense" tag was invalid attribute. However, earlier this month, we were able to get rel="jslicense" to become a rel value that is considered valid HTML5.

To get rel="jslicense" recognized as a valid HTML5 link type, we needed to get it listed on the existing-rel-values page of the wiki. Specifically, the W3C's HTML5 specification states that link types defined as extensions in the wiki page with the status "proposed" or "ratified" may be used with the rel attribute on <link>, <a>, and <area> tags. So, in 2014, we submitted our "jslicense" rel-value for review on, and then after some conversations with administrators and showing that various sites were actually making use of "jslicense" rel-value, the good folks at listed "jslicense" as a valid (i.e. "proposed") HTML5 link type extension.

Special thanks to Tantek Çelik of for taking the time to give us feedback on our proposal and for ultimately adding it as a proposed value.

Document Actions

The FSF is a charity with a worldwide mission to advance software freedom — learn about our history and work. is powered by:


Send your feedback on our translations and new translations of pages to