Textile Link Titles (Handy for Textpattern Users)

A chance discovery, which saves me a little time with each article I post, is how to set the link title attribute when using textile to mark up my posts.

In textile, links are formatted as

"Link Text":http://www.some.random.link.org

which generate XHTML links such as:

<a href="http://www.some.random.link.org">Link Text</a>.

Most of the time this is sufficient and its very easy to quickly add links into your posts.

However, sometimes you need a little more. If the text you’re using for your link doesn’t actually state where the link will take the visitor to, then its a good idea to add a descriptive ‘title’ attribute for your link. The only problem is that neither of the textile documentation pages (on Threshold State and Textism) tells you how to do this.

As it turns out, the answer is quite simple:

"Link Text(Descriptive Title)":http://www.some.random.link.org

Which generates XHTML as follows:

<a href="http://www.some.random.link.org" title="Descriptive Title">Link Text</a>

Armed with this knowledge, I no longer have to resort to writing out the full XHTML code for a link just because I want to set the title attribute. I’m hoping that if this is useful for me, it might be useful for someone else too.

Article Tags: , , ,

About Citrus Skies

Citrus Skies is a small web design studio located in Belfast, Northern Ireland, that designs and creates simple, attractive, effective websites. learn more