|
What Is HTML?
HTML is an acronym for Hyper Text Mark-up Language. It is a set of tags that can be used to mark up a text document in order that it can be displayed via a web browser on the Internet.
HTML tags will look something like this:
<tagname>
<tagname attribute>
<tagname attribute="parameter">
<tagname attribute attribute="parameter" attribute="parameter, parameter">.
The tag can have several parts and is always enclosed in pointy brackets: < >. There is always a tag name, it is always a single word, and it always comes first in the tag, at the very left, right after the opening bracket. There is never a space between the opening bracket and the tag name.
Some HTML tags only have the tag name part. Others have one or more parts called attributes. Attributes are always separated from the tag name, and from each other, with a single space.
Sometimes attributes have extra parts called parameters. Parameters are always separated from their attributes by an equal sign (=) and there are never spaces between the attribute, the equal sign and the parameters. Parameters are enclosed in quotation marks (").
Sometimes there are multiple parts in a single parameter. These multiple parts are contained within the single set of quotation marks and separated from each other by a comma and a space.

At first, an HTML document may look like so much Greek, but really it's quite easy to understand and use. It is even easier if you know a little bit about the tag names and how to read them and their parameters.
HTML like this:
<img src="http://www.somehost.com/myspace/picture.jpg" width="250" height="300" border="1" alt="Roses in Vase">
can often be quite daunting and your eyes tend to glaze over each time you see it. Just take your time and read from left to right, just like normal text. It will all be so much easier if you remember that the tag name always comes first and may be followed by one or more attributes, separated from the tag name and each other by one space. Attributes often have parameters following an equals sign and typically enclosed in quotation marks.
In the above example, the tag name, which comes first, is img, which comes from the word "image" (image) and it is followed by the parameter src from the word "source" (source). There are also width, height, border and alt (alternate text) attributes. If you read this tag like this:
Image source equals aitch tee tee pee colon slash slash double-u double-u double-u dot some host dot com slash my space slash picture dot jay-peg, width equals two fifty, height equals three hundred, border equals one, alt equals roses in vase.
it may make more sense. Go back and look at that line of HTML code and try reading it. Don't just scan over it or let your eyes glaze over... take the time and actually read it. Read it aloud if necessary. When you learn to read HTML it will begin to make much more sense, you will make fewer mistakes and you will find it becoming easy to add to your listings, me pages and other documents.
Knowing that the tag name comes first and how to read it all should help you see HTML as more than just so much non-understandable Greek.
HTML is a "mark-up" language, not a programming language. Sometimes you will se it layed out with indentations, like this:
<ul>
<li> list item one</li>
<li> list item two</li>
<li> list item three</li>
</ul>
This indentation, known as pretty printing, has nothing to do with the actual workings of the HTML tags. It is just used for convenience in reading the lines and seeing the nesting that is being used. Nesting has to do with one set of tags placed within another.
Pretty printing can be helpful, but it can also be confusing to the beginner. I won't use it in my examples on this site. Occasionally pretty printing can cause problems with the results of your code -- the page layout -- so I would suggest you don't use it either.
When you think of HTML tags it is helpful to think that there are two type or kinds:
- those that always work by themselves, like <hr /> or <br />
- those that always work in pairs like <body> and </body>
When you use tags that need to be closed, you must remember to place the closing tag in the appropriate place. Some browsers will compensate for your error if you don't but others will not be so kind and your page may end up looking bad. If your browser covers for your errors you may not even realize your code is bad. Microsoft's Internet Explorer has tradionally been the worst for this, compensating for many errors on the fly. If you test your page or auction only in MSIE you may find many other people have problems seeing what you designed.
Remember, HTML is just a set of tags. It's easy to learn and it's easy to use. You only need a handful of HTML tags to do some pretty amazing things. If you are here looking for help with the look and layout of your eBay auction listing or me page then you will find many useful things you can learn and use from this site.
It's always the right time to use good code!
[ back | top ]
|