The random musings of an indolent writer.
WordPress Quick Tips #1:
Embedding HTML in Post Titles
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.
| Print article | This entry was posted by English Mike on June 4, 2008 at 3:59 pm, and is filed under WordPress, WordPress Tips. Follow any responses to this post through RSS 2.0. Both comments and pings are currently closed. |
Comments are closed.


about 3 years ago
So, there’s a way to embed italics in the headline of a blog post, and you haven’t told me yet?! I’m hurt to the *marrow* over this! I thought we were friends, Michael!
BTW, LOVE the buttons! Very classy and cool!
about 3 years ago
its not a good idea. look at your sitemap.xml. the html-code will integrated in the the text. thats great shit!
about 2 years ago
Hey Mike,
I’m trying to do the same thing. I might have missed something but I can’t see how you did that. Do you have any example on how to use html in the title?
Thanks.