The Basics of HTML Code
Posted on 08 December 2003 05:51 AM
HTML is made up of tags and attributes, which work together to identify document parts and tell browsers how to display them.
There are five important things to know about HTML tags:
HTML code allows you to make text <B>bold</B>.
However, you cannot start writing like this immediately. Every HTML file must have a set of special tags, which tell the browser it is looking at a web page and not a text document or an image. These tags divide the page into two sections - the HEAD and the BODY.
Anything between the <HTML></HTML> tag set is part of the web page code. The first <HTML> tag tells the browser it is to display the document as an HTML document. The last tag </HTML> tells the browser it is at the end of the file. Always begin and end your HTML document with this tag set.
The next line defines the beginning of the <HEAD> area of the page. Between the <HEAD></HEAD> tag set is where we placed the <TITLE></TITLE> tag set, which obviously defines the title of the web page (remember this doesn't show up on the page itself, only at the top of the browser). The <HEAD> tag set holds many other items as well but those will be discussed in other tutorials within this section.
After the head area comes the <BODY></BODY> tag set, which contains a sentence. This sentence is the only thing the user will see on the page. Notice that to display normal, plain text no special tags are needed; you just type whatever you like. However, you will have to manually control the line breaks and paragraph breaks, as noted in the other tutorials.
If you have been an active participant so far then you should have the above code typed into your text editor. Save your document as somename.html. If you want this to be the home page on your FutureQuest site, save the file as index.html. To save the file, if you are using Windows or Macintosh, choose File|Save or File|Save As.
Now, open your browser and click FILE|OPEN, select your new html file to view it as an HTML document in your browser. If you copied the code exactly as shown above you should see Hello World! in the main window, and if you look at the very top of your browser you should see My First Web Page showing as the title.
If everything is as it should be, pat yourself on the back and continue with me through these tutorials. If not, please take the time to scroll back up and locate the problem.
"Ok, great! I can make "Hello World!" show up on my browser. I kind of had more in mind than that!", may be what you are thinking by this point. But wait! There is more! Don't give up on me now. In this section we are going to talk about creating an entire content-filled web page with headings, centered and bold text, and we'll even toss in a table and special formatting. The more tutorials you read within the HTML section, the more content your web site will contain!