![]() |
Building a better web site ... Questy's, The Minimal HTML Document |
|
HTML is just a series of tags that are integrated into a text document. Simply put, tags tell the browser what to do. HTML tags are usually English words (such as blockquote) or abbreviations (such as "P" for paragraph), but they are distinguished from the regular text because they are placed in small angle brackets. So the paragraph tag is <P>, and the blockquote tag is <blockquote>. Some tags dictate how the page will be formatted (for instance, <P> begins a new paragraph), and others dictate how the words appear (<B> makes text bold). Still others provide information - such as the title - that doesn't appear on the page itself. The first thing to remember about tags is that they travel in pairs. HTML tags consist of a left angle bracket (<), a tag name, and a right angle bracket (>). The end tag looks just like the start tag except a slash (/) precedes the text within the brackets. (For example: <H1> Heading </H1>) Not all tags are supported by all World Wide Web browsers. If a browser does not support a tag, it (usually) just ignores it. Many courses will tell you that HTML tags are not case sensitive, you can use any combination of uppercase and lowercase letters. Many web editors make tags all capital letters so they are easier to see when editing HTML. In fact many courses actually taught to make tags all in capital letters because it made them easier to spot. In HTML 3.2 tags are not case sensitive, in HTML 4.0 and beyond they are. The minimum required elements are the <HTML>, <HEAD>, <TITLE>, and <BODY> tags (and their corresponding end tags), which means that even the most basic HTML document should have these tags. While some Web documents coded without all four of these tags could render properly, it is good coding practice to include at least all four tags. Because you should include these tags in each file, you might want to create a template file with them. The <HTML> tags defines the beginning and end of the document. The <HEAD> tags define commands which do not appear in the web pages body. The <TITLE> tags are often overlooked. The TITLE appears at the top of a browser when a page is opened, in the viewer's bookmark list when your page is bookmarked, and is listed as the title of your page when indexed by many search engines. Choose a short descriptive title for all your pages. The <BODY> tags define what appears on the web page as you see it in a browser. In our sample document below you will use the <P> tag and the <H1> tag in addition to the Minimal HTML tags to create your first document. The <P> tag is implied by virtue of the <H1> tag, and therefore, it is unnecessary to include it in the coding. Heading tags, as with other block-level elements, include an automatic paragraph break before and after the tag. This is known as implicit structure. Therefore, it is not necessary to include a <P> tag before or after any of the heading tags, as they will be ignored. The Minimal HTML Document Required
elements are shown in this sample document: In order to begin the mechanics of what you will do on a regular basis, let's begin now. Open up notepad. The reason we use note pad is we want a "text only" file, (or ASCII). Type in the above text, (the minimal HTML document above) exactly as it appears. Save the file (make sure it's text only) as sample.htm Open your browser Open the file "sample.htm" in your browser There you go, you've created your first "Web Page" The following link is this exact "page"... sample.htm .... BEFORE you check it out try to do it yourself "from scratch." Since this is the exact sample as shown above you'll need to use the back button in your browser to get back to here. |
|
|
|
![]() |
Welcome
to the World of Questy |