Tag Archives: quick tips

WordPress Quick Tips #1:Embedding HTML in Post Titles

blogger

Did you know that you can embed HTML tags in the titles of your posts? I didn’t until I wanted to create a two-line title the other day. But now, after my “D’oh” moment, I suspect I might be making frequent use of this little feature.

For example, the title of this post has two lines and italic text. The HTML I used is as follows:

WordPress Quick Tips #1:<br/><em>Embedding HTML in Post Titles</em>

Just remember that your permalink (the URL of your post) may look a bit screwy if you don’t edit out the HTML. This is what WordPress did to the permalink of this post:

wordpress-quick-tips-1bremembedding-html-in-post-titlesem

The HTML brackets are removed but the tags themselves remain, mangling the text. So don’t forget to tidy up your permalinks before publishing your HTML-enhanced titles.