[thelist] Adding title with css

Wesley Mason wes at pmason.karoo.co.uk
Thu Jun 24 06:38:45 CDT 2004

Hash: SHA1

It's not possible to add the title for semantics, as others have 
suggested you'd need to either using DOM scripting, or use server side 
scripting to parse each link and add a title based on it's href value.
You can add a content styled title however, by using:
ul.pdf a:after {
content: " (PDF)";

Which would add " (PDF)" to the end of the text of each link.

Of course this adds no semantic value to the content of the document, 
but as (PDF) isn't actually added to the documents actual content 
(merely it's displayed content), then any robot parsing the text would 
see only the links text, and whatever title value you give it.

The concern I'd have with using DOM scripting to place a title, would 
be another removal of semantic value for any robot parsing the text if 
it doesn't apply scripting changes before parsing content (plenty of 
possibility for this); this is where I'd recommend server side 
scripting of some flavour (whatever floats your boat) to parse the 
links and add titles rather than client side (client side has many 
advantages and has it's place, but in such cases where it can detract 
from the usefulness or parseability of the document content, I believe 
it detracts highly from such use).

- --
Wesley Aaron Mason
(1st Vamp)
Weblog from nowhere: http://1stvamp.org/
Webcomic from somewhere: http://gfbowl.com/
Public PGP/GPG Key: http://1stvamp.org/stuff/pgp

On Jun 24, 2004, at 10:31 am, Andreas Wahlin wrote:

> I often have a pack of pdf dokuments in a row, and to denote a pdf
> dokument, I used to have images, but then I realized that I should have
> a list and change the list markers to these images like so (css code):
> ul.pdf {
> 	list-style-image: url(/images/i_pdf.gif);
> }
> Then I got tired of having to always type in titles on the links to the
> pdf documents, cus I think that's a good thing to have, so I wondered 
> if
> I could further the automation process by adding title in some way with
> css, this would be my ideal code:
> ul.pdf a {
> 	title: "PDF-link";
> }
> Is something like this possible?
> Then defining a list of pdf documents would be as simple as
> <ul>
>  <li><a href="pdf_document.pdf">the document</a></li>
> </ul>
> Rather than
> <ul>
>  <li><a href="pdf_document.pdf" title="PDF-link">the document</a></li>
> </ul>
> Andreas
Version: GnuPG v1.2.4 (Darwin)


More information about the thelist mailing list