Spartanicus <me@privacy.net> wrote:
"Pasi Kovanen" <ko***@nospam.iki.fi.invalid> wrote:
<a href="blah">this is some color</a> <h1><a href="blahblah">this is
different color</a></h1>
That's almost certainly incorrect markup.
I wouldn't jump into that conclusion. But let's first note that it is
surely valid markup, at least in HTML 4.01 Transitional. Second, I'm not
sure Pasi really meant that there's a lonesome link right before the h1
element - rather, he meant that his page has normal links that aren't
inside headings and some links that appear in headings.
A page should contain one level one header,
Normally yes, but there are exception, e.g. a genuinely bilingual page.
it should precede all other content,
No, not at all. There's quite often some content before it. Maybe a site
logo, maybe some contextual information, quite often with links. Often
there's much too much content before the main heading, but that's a
different issue.
and it's content should relate to the page it's on,
Certainly.
consequently it's content should not be linked.
Non sequitur. It might not be a good idea to make a heading link, but I
wouldn't condemn the idea entirely. I cannot figure out why someone would
make the entire h1 heading a link, but there _might_ be a good reason.
Wait... consider this: A page consists of a photo of a person and some
short personal information. Would it be wrong to put the name of the person
at the beginning and use h1 markup for it? (It's maybe not optimal, but is
it _wrong_?) And would it be wrong to make the name a link to the person's
personal home page?
If you are attempting to boost search engine position then stop it.
Well, that would apply to _dishonest_ boosting only.
Regarding the CSS techniques, Rijk's answer was a bit sketchy and
potentially misleading in its excessive compactness. The distinction
between unvisited, visited, active, and hovered links should not be lost,
and background should always be specified when specifying color, so the
full scheme would be something like
a:link {color: one1; background: white}
a:visited {color: one2; background: white}
a:link:hover, a:visited:hover {color: one3; background: white}
a:link:active, a:visited:active {color: one4; background: white}
h1 a:link {color: two1; background: white}
h1 a:visited {color: two2; background: white}
h1 a:link:hover, a:visited:hover {color: two3; background: white}
h1 a:link:active, a:visited:active {color: two4; background: white}
--
Yucca,
http://www.cs.tut.fi/~jkorpela/