Try
document.title = 'Home \u00bb site.com';
Generally you can look up your special character at a site like this and then, once you know the numeric code, you can construct a Unicode escape sequence in your JavaScript string. Here, that character is code 187, which is "bb" in hex. JavaScript Unicode escapes look like "\u" followed by 4 hex digits.
Answer from Pointy on Stack OverflowTry
document.title = 'Home \u00bb site.com';
Generally you can look up your special character at a site like this and then, once you know the numeric code, you can construct a Unicode escape sequence in your JavaScript string. Here, that character is code 187, which is "bb" in hex. JavaScript Unicode escapes look like "\u" followed by 4 hex digits.
document.title takes the string as it is, so you can do this:
document.title = 'Home » site.com';
If you need to provide it as the entity name, you can set the innerHTML attribute. Here are two examples of how you can do it.
document.getElementsByTagName('title')[0].innerHTML = '»';
// or
document.querySelector('title').innerHTML = "»";
How do I type special characters in HTML?
What is the difference between HTML entities and Unicode?
How do I use Greek letters in HTML?
I found the above answer didn't work for me, but the following does:
li:before{
content: "\00BB";
}
This uses the hexadecimal code for » instead.
A nice hexadecimal converter can be found here.
If you don't want the arrows to appear as content then why not go for a css background?
li { background: url("raquo.gif") no-repeat left center; }
The short answer to your question is "No, there aren't."
« and » are not actually intended as direction arrows, despite their frequent usage as such.
What they are actually intended for is hinted at by their entity names -- they're supposed to be "angled quotes".
Certain European countries (notably France) tend to use these characters for speech marks instead of the inverted-comma style quote marks that are more commonly used by the English speaking world, and that is what these characters are actually meant for -- see http://en.wikipedia.org/wiki/Guillemet for more info.
Given this, it's hardly surprising that there aren't any up and down arrow variants of them.
Feel free to use them as directional arrows (everyone else does, even if the semantics are questionable), but don't expect them to have every variant you might want, because they're not graphics; they're typographical characters.
I guess if you really want to, you could use CSS to rotate the existing left and right arrows by 90 degrees. I wouldn't suggest it as a good idea though.
No, there are no vertical versions of those quotes. A good alternative might be these? ⇐ ⇑ ⇒ ⇓
⇐ ⇑ ⇒ ⇓
Else, rotating is indeed going to be a good option.
Back in the day these were quite common so perhaps has become a form of an anti-pattern.
But you are correct, these are actually punctuation characters...not visual arrows. So it is awkward to have them read out-loud in a screen reader (or view them if you are French).
Today, I'd argue, we can do much better with CSS. Create the arrow icon as you see fit and then use it as a background image inside the link. That takes care of accessibility issues, plus gives you the flexibility to make it visually as you see fit.
It's semantically incorrect, and I'm not sure of all the ramifications of that incorrectness, but I recommend using more semantically appropriate characters like
right arrow → (→) and left arrow ← (←). I think most screen readers, if they audiblize them, would use the character names ("right arrow" and "left arrow"), and this is probably better than audiblizing "left double angle bracket".
Of course you could use background images that look however you like and are invisible to screen readers, but there's nothing wrong with using characters, and the characters give you better performance (lighter payload) than images.