Reputation: 13
My example:
HTML:
<title>hello</title>
CSS (that I'd like to apply):
title {
text-transform: uppercase;
}
Output:
<title>HELLO</title>
Any ideas?
Upvotes: 0
Views: 1729
Reputation: 1039
You can apply CSS to the element, but not though the style attribute (since it is for "All elements but BASE, BASEFONT, HEAD, HTML, META, PARAM, SCRIPT, STYLE, TITLE").
I'm not aware of any browser that will apply CSS for the rendering of the title in browser tabs or title bars though.
You can, however, do something like:
head { display: block; }
title { display: block; font-size: 200%; font-weight: bold; }
Upvotes: 1
Reputation: 363
You don't. The title tag is not formatted text. If JavaScript is an option you can use: document.title = document.title.toUpperCase();
Upvotes: 1
Reputation: 597
Nothing in the head tag is stylable. if you really can't just add the uppercase in html you could do it in javascript but I highly recommend just typing the string in uppercase.
Upvotes: 0