![]() |
![]() |
||||||||||||||||
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
What is a tag? A tag is a command that tells the web browser what to do. A container is a set of paired tags consisting of an opening and ending tag. While most HTML tags are containers, some HTML tags are empty tags, single tags that don't require a closing tag. In a container, the opening tag tells the browser where to start a command and the closing tag tells the browser where to stop. The opening tag will always have a '<' at the front, the tag name and a '>' at the end. An example of an opening tag is: <HTML> All closing tags will have a '<' at the front, then a '/', the tag name, then the '>'. An example of a closing tag is: </HTML> Remember, closing tags tell the browser to stop a particular command. Failure to close your tags will instruct the browser to format the rest of your document according to your unclosed tags' commands. Close all containers to prevent your HTML pages from appearing distorted. Since different containers create different commands, only the text within containers will differ. In the above example, the ellipsis indicate that text will go between the container tags. The text and/or image between any container will display in your browser. The container tags format the contents between them. It may help to think of an HTML page as a set of nested tags. Container tags will have text nested between their opening and closing tags. Opening container tags may contain attributes that modify their commands. Empty tags can be placed anywhere within the BODY container (see below) of an HTML document, and they are primarily used to format a page (add a horizontal line, page break etc.). OK, that was a lot to digest. Take a breath; it will all make sense soon. REMEMBER: Most problems with displaying web pages come from not pairing the tags.
Using Notepad You can indent your tags using the SPACE bar and create line breaks using the ENTER key to make it easier to read and keep organized. But don't press the ENTER key within a tag.
In addition, HTML is not case-sensitive. You can type your tags in all caps or lower-case. Saving your HTML Document
Viewing your HTML Document
NOTE: To view your results, save any changes you've made and click your browser's REFRESH button. Otherwise, it will continue to show the same page.
| Home | Lesson 1 | Lesson 2 | Lesson 3 | Lesson 4 | Lesson 5 | FAQS |
|