<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN”
<html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”en” lang=”en”>
background: #689C54 url(http://www.blogblog.com/dots_dark/bg_minidots.gif) top center repeat;
font-family: “Lucida Grande”, lucida, helvetica, sans-serif;
Weblogs – or “blogs” as they are commonly known – are like personal Web pages, except
they are written in journal style, like Tony’s Web journal. Many people who create blogs
use online services that take care of the details of managing the blog entries. These services
also provide pre-made templates that allow you to pick from a variety of looks for your blog.
They offer different background colors, font styles, and even background images you can use.
But they also allow you to customize your blog template and create your own unique look for
your blog, with, you guessed it – XHTML and CSS.
Here’s a snippet of XHTML and CSS from the blog template of a popular online blogging
service, Blogger.com. As you can see, they’re using all the same elements and properties
you’ve learned about in this book. And they’re even on top of the new standards: their
templates use XHTML 1.0 Strict, so it’s a good thing you’ve learned how to write strict
XHTML, right? Let’s take a closer look...
This blogging service uses XHTML 1.0
Strict, so here’s the DOCTYPE and
<html> attributes you’ve seen before.
These <$...$>s are template variables; they are filled in with
the name of your blog and other content when you create
your blog, and whenever you add a new post. You should
leave these variables like they are, as they’re needed to
correctly display your blog content.
Here’s the top of the style sheet that gives your blog its look.
This template is removing the margins and padding from the
body, giving the text a default color, putting an image in the
background of the page, and setting font properties.
There are lots more style rules here. Each style
rule controls things like the font used for your
blog entries, the headings, the colors,... in other
words, all the same stuff you’re used to styling now.
The XHTML contains all the parts you need for
your blog: headings, entries, dates, etc. Each
content area will also have a <$...$> variable for
plugging in the content from your post.
better looking blogs