ServAce85
ServAce85

Reputation: 1622

What does the rel="generator" tag mean in Wordpress?

In the Wordpress theme I'm using, I saw a line that said the following in the footer:

<a href="http://wordpress.org/" rel="generator">Proudly powered by WordPress</a>

What does the rel tag do in this instance?

Upvotes: 3

Views: 515

Answers (1)

j08691
j08691

Reputation: 207901

About the rel attribute MDN states:

For anchors containing the href attribute, this attribute specifies the relationship of the target object to the link object. The value is a comma-separated list of link types values. The values and their semantics will be registered by some authority that might have meaning to the document author. The default relationship, if no other is given, is void. Use this attribute only if the href attribute is present.

W3.org adds:

Relationship between the document containing the hyperlink and the destination resource. The rel attribute has no default value. If the attribute is omitted or if none of the values in the attribute are recognized by the user agent, then the document has no particular relationship with the destination resource other than there being a hyperlink between the two.

So in your case, the rel attribute for that link is saying (to someone) that the generator of the page is WordPress, with a link provided to WordPress.org.

You might notice though, that generator isn't listed as a valid link type. This causes errors when validating the page:

Bad value generator for attribute rel on element a: The string generator is not a registered keyword.

So depending on whether HTM lvalidation is important to you or not, you may want to alter or remove that attribute.

Upvotes: 1

Related Questions