XHTML is the best markup language to make websites. It’s easy to learn, clean and powerful.

Now that you have a global understanding of web design, and that you possess all the tools you need to make a website, I’ll teach you the basics of XHTML.

“How to make a website” series

This article is the third of a series untitled “How to make a website”. In this series, I show you step by step how to make simple, effective, and standard compliant websites.

All the articles are short so that they are easy to digest and memorize. With a little commitment, you’ll soon be able to call yourself a web designer!

Here are the articles of the “How to make a website” series:

  1. The nature of web design
  2. The only 8 tools you need to make websites
  3. An introduction to XHTML

What is XHTML?

XHTML is a combination of HTML and XML. It isn’t a programming language but a markup language. A markup language is a language which uses tags to build web pages.

In other words, XHTML is a language that describes and organizes (markup) elements with tags. Here is how we could translate XHTML into Englis

<h1>The headline</h1>

<p>A paragraph</p>

<ul>
   <li>First element</li>
   <li>Second element</li>
   <li>Third element</li>
</ul>
-"Start with a big headline"

-"Next, add a paragraph"

-"Then, write an unordered list
which consists of three elements.

You see, it’s intuitive. You describe what you want in your web page with XHTML tags and that’s it!

Tags and Attributes

As I just told you, XHTML uses tags to describe how to display data (be it text, xml, etc.). Here is how these tags must be written.

How to write tags

  1. Tags must start with a “<” and finish with a “>”:
    <title>, <head>, <img>
  2. Tags must be properly closed:
    <title>This is the title</title> or <img />
  3. Tags must be properly nested:
    <ul>
    <li>First element</li>
    <li>Second element</li>
    </ul>
  4. Tags must be written in lower case:
    <title>, <head>, <img>

How to add attributes

Sometimes, tags are not precise enough and you need to add attributes. Attributes are written inside the tags, like this:

attribute="value"

For example, without attributes the link doesn’t work and has no title:

<a>This is a link</a>

But with attributes, the link is working fine, and you know that it will take you to the home page:

<a href="http://www.woobzine.com" title="Link to the home page">This is a link</a>

There are many attributes to learn, but it’s not the time for that yet. Right now, you just need to know that these attributes exist.

Conclusion

In order to make a website, you need to learn XHTML markup language. This language uses tags and attributes to describe web pages.

This article was all about theory and maybe not that fun, but the good part is coming soon: in the next one, I’ll teach you how to create your first web page!

Enjoy!