473,666 Members | 2,728 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Styling title element

Although http://www.w3.org/Style/LieBos2e/enter/ say "The title of a
document does not show up on the canvas, so it is not affected by CSS
styles", there is a note by Seamus P. H. Leahy on styling the title
element in CSSPlay
http://moronicbajebus.com/wordpress/...title-display/
When I tried this to add a background image, the Jigsaw validator
http://jigsaw.w3.org/css-validator/validator-upload didn't complain.

The CSS I used was-
head, title{ display: block; }
title{ height: 0; padding-top: 240px; overflow: hidden;
background-image: url(images/test.jpg); background-repeat: no-repeat; }

While I didn't find much about this by Googling, images and background
colours worked in the first three browsers I tried (Firefox, Opera,
Safari).

Is there any reason not to use this?

--
http://www.ericlindsay.com
Dec 15 '06 #1
4 19696
Eric Lindsay <NO************ *@ericlindsay.c omwrote:
>Although http://www.w3.org/Style/LieBos2e/enter/ say "The title of a
document does not show up on the canvas, so it is not affected by CSS
styles", there is a note by Seamus P. H. Leahy on styling the title
element in CSSPlay
http://moronicbajebus.com/wordpress/...title-display/
When I tried this to add a background image, the Jigsaw validator
http://jigsaw.w3.org/css-validator/validator-upload didn't complain.

The CSS I used was-
head, title{ display: block; }
title{ height: 0; padding-top: 240px; overflow: hidden;
background-image: url(images/test.jpg); background-repeat: no-repeat; }

While I didn't find much about this by Googling, images and background
colours worked in the first three browsers I tried (Firefox, Opera,
Safari).

Is there any reason not to use this?
It can cause User Agents to render the same content twice. It may
prevent a speaking UA's ability to be configured to speak the title or
not. IIRC the specs specify that title content must not be rendered in
the viewport.

CSS allows people to do many things that shouldn't be attempted. A CSS
checker will at best only check the code syntax, it can at best only
guess and warn about whether something is good authoring practice.

The question however is: why on earth would you want to do this?

--
Spartanicus
Dec 15 '06 #2
In article <qo************ *************** *****@4ax.com>,
Spartanicus <in*****@invali d.invalidwrote:
Eric Lindsay <NO************ *@ericlindsay.c omwrote:
Although http://www.w3.org/Style/LieBos2e/enter/ say "The title of a
document does not show up on the canvas, so it is not affected by CSS
styles", there is a note by Seamus P. H. Leahy on styling the title
element in CSSPlay
http://moronicbajebus.com/wordpress/...title-display/
When I tried this to add a background image, the Jigsaw validator
http://jigsaw.w3.org/css-validator/validator-upload didn't complain.

The CSS I used was-
head, title{ display: block; }
title{ height: 0; padding-top: 240px; overflow: hidden;
background-image: url(images/test.jpg); background-repeat: no-repeat; }

While I didn't find much about this by Googling, images and background
colours worked in the first three browsers I tried (Firefox, Opera,
Safari).

Is there any reason not to use this?

It can cause User Agents to render the same content twice. It may
prevent a speaking UA's ability to be configured to speak the title or
not. IIRC the specs specify that title content must not be rendered in
the viewport.

CSS allows people to do many things that shouldn't be attempted. A CSS
checker will at best only check the code syntax, it can at best only
guess and warn about whether something is good authoring practice.

The question however is: why on earth would you want to do this?
The title element seemed to me to be a perfect place to put an otherwise
irrelevant graphic element that was indicative of the type of web site,
rather than the specific content of any page.

The text in the title element still appears as usual in the browsers, so
I would hope most speaking UA would still cope with it.

My architect neighbour thought he should have a web site. After I
gathered some text material for SEO, he sent a list of web sites he
really liked (all of which were invalid, had a splash page with no text
content, and needed Javascript for navigation). They don't appear in the
first hundred or so search results for their areas. However they were
very pretty indeed.

It just seemed to me that a background graphic in the title element was
the perfect place for something pretty that had nothing to do with the
actual page contents. I am looking at using several background graphics
on the site. I imagine I could get the same visual effect in several
other ways, so if it turns out to be a really bad idea I will look
elsewhere.

I am not at all used to doing pages with anything except text, so I am
sort of scratching about with which way to approach a site that has to
look fancy as well as getting into the top two or three search engine
positions.

--
http://www.ericlindsay.com
Dec 15 '06 #3
Eric Lindsay <NO************ *@ericlindsay.c omwrote:
>The question however is: why on earth would you want to do this?

The title element seemed to me to be a perfect place to put an otherwise
irrelevant graphic element that was indicative of the type of web site,
rather than the specific content of any page.
Why do you think that specifying a background image on the title element
would be any different than using a background image on a body element?
>My architect neighbour thought he should have a web site. After I
gathered some text material for SEO, he sent a list of web sites he
really liked (all of which were invalid, had a splash page with no text
content, and needed Javascript for navigation). They don't appear in the
first hundred or so search results for their areas. However they were
very pretty indeed.

It just seemed to me that a background graphic in the title element was
the perfect place for something pretty that had nothing to do with the
actual page contents. I am looking at using several background graphics
on the site. I imagine I could get the same visual effect in several
other ways, so if it turns out to be a really bad idea I will look
elsewhere.
Its a really daft idea and the above is no justification. You should
also consider that IE doesn't support this. For page authoring SEO is
almost always synonymous with nasty spamming tricks that degrade the
quality of the content considerably.
>I am not at all used to doing pages with anything except text, so I am
sort of scratching about with which way to approach a site that has to
look fancy as well as getting into the top two or three search engine
positions.
Create good quality content, mark it up properly, style it so that it
looks good, forget about SEO completely. When you are finished making
the site, get good quality inbound links to the site, that will do much
more for SE ranking than any "SEO".

--
Spartanicus
Dec 15 '06 #4
In article <cp************ *************** *****@4ax.com>,
Spartanicus <in*****@invali d.invalidwrote:
Eric Lindsay <NO************ *@ericlindsay.c omwrote:
Why do you think that specifying a background image on the title element
would be any different than using a background image on a body element?
Once the head element was included in the display, I didn't think the
title element would be treated any different to a background image on
any other body element. But if that was the case, then I didn't see any
particular reason not to use it.
>
Its a really daft idea and the above is no justification. You should
also consider that IE doesn't support this. For page authoring SEO is
almost always synonymous with nasty spamming tricks that degrade the
quality of the content considerably.
IE doesn't support allowing head to display? I guess that is a good
enough reason not to.

I am resisting anything that approaches SEO spamming tricks. One problem
is the architects are very visually oriented, and basically want the
text left out (or not visible). I have been deliberately not styling the
pages until I get enough content from them, because I know they are
going to be much more interested in the appearance than the content.
I am not at all used to doing pages with anything except text, so I am
sort of scratching about with which way to approach a site that has to
look fancy as well as getting into the top two or three search engine
positions.

Create good quality content, mark it up properly, style it so that it
looks good, forget about SEO completely. When you are finished making
the site, get good quality inbound links to the site, that will do much
more for SE ranking than any "SEO".
Good advice. I won't have much problem getting the search engine
position I want, as long as I keep picking on the architect folks for
more and more material I can use. At least, as long as I can keep them
from wanting to imitate sites with no content. The good inbound links
will initially be more of a problem, as usual, although I'll get a few
early ones.

Thanks for the usual helpful comments. When I stop experimenting and
start styling, I'll probably ask for help again.

--
http://www.ericlindsay.com
Dec 15 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
10101
by: D. Alvarado | last post by:
Hello, I am trying to find the <TITLE> element of my document. Normally alert(document.title); works just fine, but when this statement is within a page that is a frame in a larger document, the above call always returns the title of the parent (container) page. Is it possible through JS to deduce the <TITLE> element of the current page, even if that page is a frame?
5
8031
by: Dawn Ojanpera | last post by:
Hello, Call me crazy but I can't figure out why my TITLE text will not display in the title bar of my browser window. Here are the contents of my html file: <HTML> <HEAD> <TITLE>My first HTML document</TITLE>
50
5910
by: MozillaCensorsMe | last post by:
Hello, While I haven't finished my wonderful tutorial to save the world, I do have a simple question. What's the difference between h1 and the title tag? For me it seems as though both can be used interchangebly. For example, the articles on my site (andkon.com) have the same title as h1. Comments?
4
15398
by: DU | last post by:
I am looking for opinions on the issue of length of title attribute. First of all, the current HTML 4.01 spec is rather vague on this issue... at least, it isn't explicit nor normative. The HTML 4.01 spec and WAI mention "short message", "short description", "advisory title", "informative link title" for the title attribute. Personally, I think that having a more than 128 characters tooltip does not meet the original goals of the HTML...
3
2192
by: Andy Dingley | last post by:
We've all seen this structure many times: <ul> <li><a href="..." >Click here</a></li> <li><a href="..." >Click here</a></li> </ul> Now it's obvious good practice to have sensible link texts, and also sensible use of title attributes on either the<a> or <li> elements. What's a good rule of thumb for these attributes ?
4
58697
by: laredotornado | last post by:
Hello, How do I use Javasript to get the <TITLE> element of a web page? If anyone can supply a cross browser way (IE 5.5+, Firefox 1+), it is most appreciated. Dave
3
1210
by: musosdev | last post by:
Hi guys I'm using a MasterPage for my website rebuild (vs2005, .net2, c#). I want to be able to control the Title element, both on the MasterPage and the Content pages. For example, on each page I want the following to appear for the Title.. SITENAME - some page related title
3
1675
by: Ed Jay | last post by:
I have a text-type form input element that I'd like to style as follows: Before the visitor enters text, I'd like the value that is shown in the text field to be gray, and when the visitor enters text into the filed, it is black. Is there a way to do this? -- Ed Jay (remove 'M' to respond by email)
15
1909
by: Steve B | last post by:
Is there a way to manipulate the <TITLEin the csharp code?
0
8438
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8779
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8549
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8636
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7376
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6187
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4186
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4356
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2004
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.