Creating an External Stylesheet

Creating an external stylesheet is easy. It’s just a matter of putting your CSS coding in a file with the right extension, and linking it from the head of your HTML document. Every stylesheet must have the “.css” extension. I am boring and tend to name my stylesheets “stylesheet.css” or “stylesheet-[colour].css” where [colour] is the […]

Three Column Tableless (CSS) Layout

Mastering a two-column layout is all well and good but what if, like many others, you want a three column layout? Although it’s not as hard as you might think, there’s no float: center;, so we have to do a little fiddling to get everything to sit properly. This is what we’ll want to replicate: […]

The Centering Cheat

If you’ve converted to valid XHTML, you’ll have probably realised by now that the <center> tag has been deprecated (is no longer valid). No worries, this is easy to get ’round with a bit of CSS. First, give all the elements you want centered a class of something like “centered”, like so: <div class=”centered”> Then […]

Add a Favicon to Your Website

You may have noticed that most decent, modern browsers have support for favicons. Favicons are the little images you can see next to items in your Bookmarks/Favourites drop-down — that is, if the site owner has made one. Some browsers also display them next to the site title in its tabs. Here I’ll show you […]

Classes and IDs: What’s The Difference?

Class and id selectors are integral to creating customiseable CSS based layouts. There are however, several differences between the two. Ids are assigned to tags, like so: <tag id=”cssidname”>. They cannot start with a number and you cannot apply multiple ids to one tag. Also, each id can only appear once in a document although […]

Vertical Semantic List-based CSS Navigation

A major part of web standards involves using mark-up (HTML or XHTML) for its intended purpose instead of purely to style pages. Part of this involves using lists to control navigation, because that’s exactly what navigation is — a list of links. Unfortunately, while some of us are customising unordered lists with CSS there are […]

Validating your XHTML1.0 WebPage

I’m assuming that you’re reading this tutorial because you’ve either seen my Validating Your HTML 4.01 WebPage tutorial and want to know more, or are curious about the differences between HTML and XHTML. XHTML is a combination XML and HTML. Designed to be as easy to write as HTML but with the strictness of XML. […]