Click here for more about Simon Shull Foust

This is a blog about xhtml/css, content management systems, and other geeky stuff.

Title Tags and Body IDs with GoodBarry

Goodbarry - Free 30-day trial.While integrating sites with GoodBarry I’ve noticed that you can edit both the Title Tag for a given page (as well as the Body ID) right from the content editor. This is a very helpful tip, because the default title tag is often insufficient as a description of a given page.

If you have a page called, “Home” then that’s what the Title Tag is going to say unless you do the following. Go to your administrative area and go to the web page you want to edit. Then click over to the html view in the content editor and make sure you have the proper tags there. You should have <html>, <head>, <title>, <body>, and their end tags in addition to the content of the page. For instance:

<html>
  <head>
    <title>Home</title>
  </head>
  <body>
    <p>
      This is an example of content.
    </p>
  </body>
</html>

What you want to do is edit the Title Tag to be more descriptive. Maybe something like <title>Homepage of Simon Shull Foust</title>. And also, feel free to add an ID on the Body tag so you can reference this particular page in your StyleSheet. This is often used to apply special styles to the navigation of a website - a sort of “selected” state.

So if you wanted for the link in the main navigation of your site to be gray when you’re on a given page, you can add your ID to the body tag like this: <body id=”home”> and then in your StyleSheet make a reference like this: #home #nav li.home a { color: #777; }.

So, in a sense, the Title Tag and Body ID specified for each of your content pages overwrite your Site-Wide Template, which most like just has a body tag with no ID. This is a very helpful practice to give you more control over individual pages.

Tags: ,
Written by Simon Shull Foust on July 29th, 2008 · Comments (0)

No comments yet

Leave a Reply

Tags

Blogroll

Meta