In preparation
Base concepts and first steps
First real programs
Objects

Some HTML bits

What is HTML

As said before, HTML is the language which describes the structure and the rough layout of every webpage. It is basically the heart of what we see displayed in the browser, the thing without which you wouldn’t be able to build any page. HTML is an acronym, which stands for Hyper Text Markup Language, meaning it is a language for text formatting, focused on hypertext (links). Many people call HTML a programming language, but it can’t be really described as such, since it doesn’t have any logical operations.

The basic concepts

HTML is all based on one important concept: tags. A tag is any text enclosed between angular brackets, like <tag_name>. Different tags have different effects. To close a tag, you write the same thing, just with a slash after the first braket, like </tag_name>. Usually, tags are opened and closed, and between the opening and closing tag, is often located some text, that will be formatted in a specific way relative to the tag name: <tag_name> some text </tag_name>. HTML is called a case unsensitive language, meaning that it doesn’t care if you write tag names upper case or lower case, so <tag_name> is equal to <TAG_NAME>. Another neat thig about HTML tags, is that you can nest them together, putting one into the other, like <tag> <nested_tag></nested_tag> </tag>. Now that we have some basic concepts, lets see some tags and the standard HTML structure:

<!DOCTYPE html> <html> <head> <title>Title of the page</title> </head> <body></body> </html>

If this scares you, don’t worry, we are going to analyse it line by line. Starting from line 1, we encounter our first tag. This is a special and weird tag, which is included in the page only once, at the top; its purpose is to say “hey! This is an HTML document!”. For line 1, this is all we need to know. On line two we find our first proper tag: the <html> tag is used to enclose all the HTML code in our page. It opens on line 2 and is close on line 7, containing two other tags. Simple enough, right? On line 3 the tag <head> and on line 5 it is closed. This is the first thing to be read by the browser when the page loads. It is used to load some files and do other things that we are not going to cover for now. On line 4, the tag <title> defines the text that will be written at the top of the tab (the title of the page), like seen in this image:

The last tag in the default HTML structure is the <body>, where all the things we want to see will be put. Any text you write in the body (if not enclose by tags) will be displayed in the webpage.

Creating and running HTML files

Some HTML tags

Attributes

Usefull websites