Archive for February, 2008
Block elements, inline elements
Most of elements in html can be divided in to categories: inline and block. For exemple a <div> tag is a block element and a <a> tag is an inline element.
If you don’t see the difference between the <a> and <div> tags in terms of nature you need to read the follow. Understanding the differences and write your code properly with those difference will spare you time during the validation but also during the designing.
Css preloading, easy step by step
Building a menu with nice pictures often give a better impression to a website. If you care about the roll-over aspect you will also preload your images so you don’t get this annoying flickering effect when you wait for the image to be loaded.
A common technique is to use javascript to perform the preloading. All right, not to much to do for one button, but for ten? And if your user doesn’t allow javascript?
An other way to do it is to use a css technique. The concept is fairly simple, create one image with the two states of your button (normal, hover) and use the :hover pseudo class to swap the position of the image.
Lets talk about semantic markup
If you are a Web Designer or Developer you must have once heard about semantic. Even if you haven’t done it on purpose you might have also followed some semantic rules during your work without knowing it.
To be honest semantic is an other buzzword we use today to sale something as old as html.
The shorter definition I can come up with is “Use the right markup for the right purpose”. I will talk about semantic more deeply later but for know just try to grasp the concept.
Document Type Declaration and Validation
In order to build a ‘valid’ website you will have to define first what standards you want to follow. In other words you need something to tell the validation engine ‘This page is coded following this standard’.
This declaration need to appear in your page, before any markup of any type. It takes the form of a line of code, for example :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
