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.
- The abbreviation HTML is decrypted as HyperText Markup Language.
- Remember, it is not a programming language, it is a markup language.
- HTML uses markup tags to describe the structure of a Web page.
Tags
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> <html> <head> <meta charset="utf-8"> <title>Summer Menu</title> </head> <body> <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> </body> </html>
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.
With this theme look: