Featured Posts

Tags and Elements of HTML

Posted by admin | Posted in Theory Subjects, XML | Posted on 17-11-2009

0

If you look at the first and last lines of the code for the last example, you will see pairs of angle brackets containing the letters <html>. The two brackets and all of the characters between them are known as a tag, and there are lots of tags in the example. All of the tags in this example come in pairs; there are
opening tags and closing tags. The closing tag is always slightly different than the opening tag in that it has a forward slash character before the characters </html>.

html

html

The special meaning these tags give is a description of the structure of the document. The opening tag says “This is the beginning of a heading” and the closing tag says “This is the end of a heading.”Without the markup, the words in the middle would just be another bit of text; it would not be clear that they formed the heading.
Now look at the paragraph of text about the company; it is held between an opening <p> tag and a closing </p> tag. And, you guessed it, the p stands for paragraph.

As you can see, the markup in this example actually describes what you will find between the tags, and the added meaning the tags give is describing the structure of the document. For example, between the opening <p> and closing </p> tags are paragraphs and between the <h1> and </h1> tags is a heading. Indeed, the whole HTML document is contained between opening <html> and closing </html> tags.
If you were wondering why there is a number 1 after the h , it is because in HTML and XHTML there are six levels of headings. A level 1 heading is sometimes used as the main heading for a document (such as a chapter title), which can then contain subheadings, with level 6 being the smallest. This allows you to structure your document appropriately with subheadings under the main heading.

VN:F [1.9.3_1094]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)

Post a comment

You must be logged in to post a comment.