Roots
Back

An Introduction To HTML

What is HTML?

HTML stands for HyperText Markup Language. HyperText refers to how you move between pages on the web - hyperlinks (or simply 'links') allow you to browse in a non-linear fashion; you can link to and hence navigate to any other page on the web. Markup refers to the tags used in HTML which mark or designate the text contained within them as a particular kind of text. Language simply means that it is a type of programming language - one which is used to write websites.

How to use HTML

HTML consists of tags, which are written inside angular brackets - <>. Every opening tag must have a closing tag (with a few exceptions). An opening tag is simply written as the tag name in angular brackets, and a closing tag is written with a forward slash before the tag name;

<tag> - opening tag | closing tag - </tag>

Depending on the tag you are using, you can put different kinds of information between the opening and closing tags. Many tags change the style or give functionality to the text contained within them.

<b>Bold Text</b>

The b tag makes the text within it bold, and does not need to have any attributes.

Again depending on the particular tag, you can further control the style or functionality by using tag attributes. Attributes are written in the form attribute-name="value".

<font color="#000000">Black Text</font>

The font tag controls the style of the text within it, and can have various attributes. The attribute color affects - surprisingly enough - the color of the text within the tag. #000000 is the color code for black.

Making a webpage

All webpages should have three basic tags; html, head and body. It is unusual to leave out a title tag as well.

<html>
<head>

<title>My Website</title>

</head>
<body>

Content of your website.

</body>
</html>

You can include any kind of content you like, using other HTML tags, CSS styling and PHP for dynamic content.