Introduction to HTML
So what is html all about?
html is a method of adding information to some text. Normal text contains information, but it does not tell us what sort of information it is.
For example, consider the following block of text:
That text means something, but on its own there is no way to tell which part of a text holds what significance. HTML adds labels, or 'tags', that mark certain parts of the text as having extra meaning.
So, lets add some html code to that block of text, and see what it does
<h1>Animals of the world</h1>
<p>There are many animals in this world and they eat different things.</p>
<ul>
<li>Lions eat meat.</li>
<li>Owls eat mice.</li>
<li>Frogs eat insects.</li>
</ul>
Animals of the world
There are many animals in this world and they eat different things.
- Lions eat meat
- Owls eat mice
- Frogs eat insects
So what was that all about?
HTML is all based on 'tags'. A tag looks like this:
<tag> Some content <tag>
It has two 'angle brackets' surrounding the label. That label can be 'p' for paragraph, or 'h1' for the main heading, and many more besides. What these tags do is to label that piece of text with a certain extra meaning. These extra meanings will display in certain ways in your browser, as you can see above.
At this point, most people are worried that their pages look pretty boring. Well, html is only one half of the equation. What we are aiming for is known as the 'separation of style and content'.
This means that the html is going to add meaning to the text and in the second half of this course we will look at adding style which is layout and attractiveness.
On every page of this site you have the button at the top that allows you to View without style. This will show you the default of the layout for the html for a page without any of the style added, and it will look pretty bland.
The theory of this is often pretty boring, so now is a good time to start doing these examples in a practical way.
A good place to start is the necessary basics of an html document