MENU NEXT

THE 3 RULES OF HTML Frustrated Computer Duck

Every mother has some rules. These are HTML's.

  1. If you open it, close it!
  2. HTML decides where one command ends and the next begins through the use of "<" to signify the beginning of a command (also know as a "tag") and ">" to signify the end of a command. If the number of "<" is not the same as the number of ">", HTML gets a huge headache and refuses to work properly. Be nice to HTML, it's only a computer language, and make sure that the number of "<" equals the number of ">". Some HTML editors will use a colour scheme to let you know when the tag is complete.

  3. If you start it, end it!
  4. The majority of HTML commands work as a tag team. It takes one tag to start a command and a second tag to end it. The content (i.e. words, graphic, link) that the command is to act on is placed between the two tags. It is a lot like tag team wrestling (without the violence!)

    Usually the beginning tag looks like <command> and the end tag looks like </command>. Pay close attention to the slash ("/"). Slash is an important character in the world of HTML. Her presence will almost always signify the end tag. Exceptions are when slash is used in the name of a link or a graphic.

    There are a couple of solo tag stars in the world of HTML besides Slash. Two commands which have no ending tag are <BR> for new line and <P> for new paragraph. Since <BR> and <P> do nothing to content but leave space, they don't need the help of Slash or an ending tag.

  5. A sandwich just isn't a sandwich…

HTML is a lot like a sandwich. A sandwich needs two pieces of bread but it also needs some filling before it is a truly sandwich. For HTML, the bread is the opening and ending tags of a command and the filling is the content you wish the command to act on. This content must be between the two tags. If you put nothing between the tags, they do nothing. If you put nothing around the content, it just makes a mess, (think of your 6 month old eating strained carrots without supervision). Likewise, too much filling or too much bread can also get messy. Make sure that the right content is between the right tags, and that commands always have something to do.