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.

3 thoughts on “WordPress Quick Tips #1:Embedding HTML in Post Titles

  1. Brandon

    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!

    Reply
  2. Chris

    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.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *