HTML elements and tags tutorial
This topic is about:
* Free HTML knowledge
* HTML tutorial
As far as many people have no basic HTML knowledge or they've got a minimal HTML knowledge, I think it's good to explain more here about the mentioned already above
tags (
HTML tags)
The HTML elements and HTML tags
It's not difficult now to learn the essence of HTML -- the HTML elements. They give structure to the HTML documents and tell the browsers how you want your site (website) to be presented.
Generally the HTML elements consist of a
start tag, some content, and an
end tag.
The HTML tags
The
HTML tags are the labels you use to mark up the beginning and the end of an element. All HTML tags have the same format: they begin with a less-than sign (
<) and end with a greater-than sign (
>). Just remember it simply: they begin with a
< and end with a
>.
Generally speaking, there are 2 kinds of HTML tags - opening tags like: <html>, <strong>, <u>, etc. and closing tags like: </html>, </strong>, </u>, etc. The only difference between an opening HTML tag and a closing one is that forward slash
/. You label content by putting it between an opening tag and a closing tag for example if you want to underline some text you'll but it between <u> and </u> like this
<u>My underlined text.</u>
and you'll get it like this: "
My underlined text." (without quotes, of course).
To learn HTML is, mostly, to learn and use its different tags.
One more example
And here I'll show you one additional example. The HTML elements
h1,
h2,
h3,
h4,
h5 and
h6 are used to make headings ("
h" stands for "
heading"), where
h1 is the first level (and normally the largest text),
h2 is the second level (and normally slightly smaller text)... and
h6 is the sixth and last in the hierarchy of headings (and normally the smallest text).
<h1>This is a heading.</h1>
<h2>And this is a subheading.</h2>
Exception
Well, as they say, there is an exception to every rule and in HTML the exception is that there are a few elements which both open and close in the same tag. These so-called 'empty elements' are not connected to a specific passage in the text, but rather are isolated labels. For example, a line break which looks like this:
<br> (in XHTML, the <br> tag must be properly closed, like this:
<br />).
Should the HTML tags be typed in uppercase or lowercase?
The correct way is to type tags in lowercase. However, most browsers might not care, if you type your tags in upper, lower or mixed cases. For instance <BODY>, <body> or <BoDy> will normally give the same result.
If you have some questions, let me/us know.