HTML basics

HTML Markup Language

HTML is a language for describing the structure of Web pages. Pages created with its help can be viewed only with the help of special programs (browsers) installed on users' computers.


HTML tags are key words or symbols enclosed in angle brackets, for example <body>, <p>, <h2> etc. Tags are two types: pairs and singles (they are also called empty). Paired tags consist of an opening and closing tag, for example: <p>text</p>. The "/" character after the angle bracket indicates that the tag is closing. Single tags consist only of an opening tag, for example: <br>. Tags are not case sensitive, so they can be written in both uppercase and lowercase letters: <P> means the same as <p>. Tags determine where the start and where ends, the HTML element.

With tags the browser recognizes the structure and meaning of your text, for example, they tell the browser which part of the text is the title where the new paragraph begins, what to emphasize and where to position the image (picture). When this information is received, the browser uses the default rules on how to display each of these items.

Note: in our CSS tutorial, you can see the default styles for any tag you're interested in.

Without the use of HTML tags, the browser will output just a solid stream of text, without indents, headers, paragraphs, etc. to make it clearer, consider this in more detail on the examples.

This looks like a page that uses tags for markup:

<!doctype html>
    <meta charset="utf-8">
    <title>Summer Menu</title>
    <h1>Drinks in our Café</h1>

    <h2>Smoothies - 4$.</h2>
    <p>Fruit drink containing orange and pineapple juices with pulp.</p>

    <h2>Milk Shake - 6$.</h2>
    <p>Ice cream mixed with chocolate syrup.</p>
Example of a Web page using HTML tags

The same thing, but without the use of tags:

Drinks in our Café

Smoothies - 4$.
Fruit drink containing orange and pineapple juices with pulp.

Milk Shake - 6$.
Ice cream mixed with chocolate syrup.
Example of a Web page without using HTML tags
Copying materials from this site is possible only with the permission of the site administration and
when you specify a direct active link to the source.
2011-2018 © | ruen