HTML is the language of the Internet. It defines the structure and layout (that is if you don't use CSS) of a Web document as well let you link to other pages or web sites. There are a great number of tags and attributes that may be used in an HTML page, if you'd like to see a list then click here.
For our purposes in this tutorial, we will keep the number of tags introduced to a minimum. As you'll see, it doesn't require much work or coding to create your first page.
See the two examples below for a very simple sample of HTML:
Example 1 - HTML Hello World
|
Now see what happens if we add a bit of 'Style'
Example 2 - HTML with Style
|
A few points to note about this example:
- There is now a <span> tag which contains a STYLE element
- The STYLE element specifies that any text between the start of the SPAN to the </span>, will be in red.
While this may not seem very powerful, it is. The old way of changing a font would be to use a <font> tag, which is embedded within the page along with the text. If a font needed to be changed, the developer would have to change it in every page on the site.
If we use CSS, we would store all of the 'styles' in an external file to be included by each page. When a font change is needed, the developer would only need to change the one file, an all pages would automatically have the new font!
