The Basics of HTML Tags
The source code of a web page is basically constructed using HTML tags which is a series of standardized keywords and abbreviations defined in the official
HyperText Markup Language specification.
HTML is a publishing language that all computers may potentially understand and immediately interpret as the initialising and formatting instructions that go into the making of a web page. Each keyword or abbreviation in HTML is known as an 'element' and each HTML element is enclosed in angle brackets like this...
< >
This 'angle bracket/ HTML element' assembly is known as an HTML 'tag' and all HTML elements have at least a
start tag and a majority of them also have an
end tag.
The start tag of an HTML element always takes this format:
<
element-name
>
The end tag differs slightly by incorporating a slash ( '/' ) and always takes this format:
</element-name
>
The angle brackets
< >
enclosing HTML elements keep them hidden behind the scenes of a web page. The elements do not appear on the actual web page itself but rather they only act as a means to instruct your
web browser how to display that which appears between the start tag and the end tag.
Each HTML element is like a command which identifies what part of your web page to address and, along with other sub-commands known as '
attributes', tells your web browser how to display that particular part. As your web browser 'reads' a web page, it encounters each HTML element start tag and then, for the most part, acts according to that element's identity and attributes on all the content (usually text) that follows the start tag. It continues as such until it encounters a subsequent end tag for that same element or the start tag of another HTML element.
Other times, an HTML element start tag (and any applicable attributes) is enough in and of itself to create a specific web page effect. This is the case with
line breaks,
graphics,
horizontal rules and a number of other standard web page embellishments.
Virtually all HTML element names are comprised of a keyword or abbreviation that gives some indication as to what the element is used for thereby making it easier to remember them all and to remember what does what.
After you become familiar with HTML through repeated use, you'll soon be writing up web pages with great ease. You'll also be able to 'pop the hood' on any web page you find on the internet, browse through the source code and actually be able to understand what that seemingly impossible jumble of HTML tags is all about. Armed with this ability, you'll be able to study how other people produce web page effects that you particularly admire and then you'll be able to reproduce those effects on your own web pages.
A list of all HTML elements can be found
here. But rather than plowing through this comprehensive list or the entire
HTML 4.01 Specification (which is not an easy read), you'd be best to download it and keep it just as a reference file. A better idea would be to continue with this tutorial which will walk you through the most commonly used web page effects and explain how to construct the HTML tags to create them.
But first we will begin with the
basic HTML web page structure...