How to make a website: an introduction to XHTML
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:
- The nature of web design
- The only 8 tools you need to make websites
- 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
- Tags must start with a “<” and finish with a “>”:
<title>, <head>, <img>
- Tags must be properly closed:
<title>This is the title</title> or <img />
- Tags must be properly nested:
<ul> <li>First element</li> <li>Second element</li> </ul>
- 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!
Related Posts
You may want to check out the following related posts:
Roland
November 30th
Hey :) nice article. What I like about it – it’s small but has a lot of information in it :) And very very easy to udnerstand.
You should definitely write more about lists in future, cause today the’re actively used to create menus and lots of people don’t know that still doing menus using a regulary table with image-based background :)
And definitely write an article about the difference between HTML and XHTML :)
Like or Dislike:
0
0
TheWebTuts
December 9th
Tutorial added to thewebtuts.com
Like or Dislike:
0
0