Jump to content

rel, rev, and xmllang


Guest Stefán Örvar Sigmundsson
 Share

Recommended Posts

Guest Stefán Örvarr Sigmundsson

I'm not quite getting why I should use the rel and rev attributes. I hardly see them round the web. And, it's standard to put the xmllang in the html tag. Do I really need to put it anywhere else, unless an actual language change takes place?

Link to comment
Share on other sites

I'm not quite getting why I should use the rel and rev attributes. I hardly see them round the web.
That's not a reason not to use them. Use them if you think it's appropriate.For example, I use "rel" in links that point to external web sites. Then, with JavaScript, I make it so that the link opens in a new window (target="_blank" is deprecated in XHTML Strict).If it makes sence, I'd use rev too. Again, rel and rev are not visible (which explains why you don't "see" them), but that's not a reason not to use them.
And, it's standard to put the xmllang in the html tag. Do I really need to put it anywhere else, unless an actual language change takes place?
No. Like you say, specify the main language in the html opening tag, and only use that attribute again if the content inside is in a different language than the main one.For example:
<html xml:lang="en" lang="en">...<div>English text</div><div>More english text, this time, with the following Bulgarian text in it: <span xml:lang="bg" lang="bg">Български текст</span></div>...</html>

Link to comment
Share on other sites

Guest Stefán Örvarr Sigmundsson

When I said I didn't see them round I meant when I'm looking at other people's code. They're not really that common, at least outside the professional world. The rev attribute is ignored by most if not all browsers. Thanks for the xml:lang clarification.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...