View Full Version : Is it OK to redefine title tags in CSS?
Can someone tell me if it's OK to redefine title tags in CSS?
I assume this is possible?
i.e. make a title tag be the same size as ordinary text.
OK... I can see that redefining title tags to be the same as ordinary text would be cheating.
I don't want to actually do this... and will have the title tag be a bigger size.
Thanks.
OM
Mikkel deMib Svendsen
12-18-2005, 05:08 AM
Do you mean a headline? The title tag is a header code that have no markup - so it has no size, color or look&feel :)
Robert_Charlton
12-18-2005, 05:42 AM
Can someone tell me if it's OK to redefine title tags in CSS?
I assume this is possible?
i.e. make a title tag be the same size as ordinary text.
OK... I can see that redefining title tags to be the same as ordinary text would be cheating.
I don't want to actually do this... and will have the title tag be a bigger size.
OM - It sounds like you're talking about H1, H2 etc heading tags. Yes, it's fine to format these with CSS. I always make mine at least a little bigger or a little bolder or set off by color or font so they stand out from the text that follows them.
If you use them as intended, as headings, you will want to do this anyway. If you're thinking of arbitrarily applying Hn tags to text on your page, you won't be using them right. They're structural elements... like main headings in an outline.
Mikkel is correct that the page title, which appears in the head section of a page, can't be marked up. Though it's very often called the title tag, it's technically the title element. Here's how w3.org describes the title element and the structure of a document...
The TITLE element in HTML
http://www.w3.org/Provider/Style/TITLE.html
The global structure of an HTML document
http://www.w3.org/TR/REC-html40/struct/global.html
thanks for the replies.
yes... i was actually refferring to h1, h2, h3 etc.
ok... so you say it's ok to redefine them.
but...... what if i redefined h1 to be the same as ordinary text on the rest of the page? wouldn't that be cheating? imgaine doing this and using it sparingly... surely this will mean that such a web page with this scores extra points with search engines?
Robert_Charlton
12-19-2005, 02:51 AM
thanks for the replies.
yes... i was actually refferring to h1, h2, h3 etc.
ok... so you say it's ok to redefine them.
OM - First, you're not redefining them... You're just formatting them. Lots of well known sites do this. It's fine.
...but...... what if i redefined h1 to be the same as ordinary text on the rest of the page? wouldn't that be cheating? imgaine doing this and using it sparingly... surely this will mean that such a web page with this scores extra points with search engines?
This is where I thought you were going with this, and if you reread my message, you'll see that I suggested that you keep them as headings and only as headings...
First, if you start turning your ordinary text into H1's, you won't be scoring extra points with the search engines. You'll just be offering badly constructed documents to them. As I said: If you're thinking of arbitrarily applying Hn tags to text on your page, you won't be using them right. They're structural elements... like main headings in an outline.
If you don't use these the right way on your pages, they're not going to get you much at all... and I don't think that headings are that big a deal these days anyway. You're probably 5 years behind the times if you think this is going to fool the engines.
You will sort of be "cheating" (to use your word), and in a really stupid way. I suggested you keep your headings looking a little bit like headings, because....
a) if you keep your H1's looking like headings, should there be a hand inspection, it will be clear you're not "cheating."
b) keeping your headings looking like headings will also serve to keep your use of these tags effective. Headings or headlines are, by their nature, short and focussed. If you start turning your whole page into a heading, you're just diffusing them.
Proper use of headings
Imagine a four or five word bold heading. Because there's contrast, your attention is caught by what the heading says.
Improper use of headings
Now, imagine a page where everything on it is effectively bold. Not much contrast here... nothing to attract your eye when all content looks the same... no focus for your page... no special boost for the most desired keywords. Important and unimportant words are seen as the same. This is in essence what happens if your whole page is H1. The whole page is shouting at you. There's no differentiation. It's all noise. In a well optimized page, your important words and phrases stand out. If you need a few words within a paragraph to stand out, make them bold.