| All you need to begin creating an html document is your favorite text editor
(e.g. Notepad, Wordpad, Word, VI, etc...).
There are many commercial html editors that you can use as well. Some of which actually
give you a graphical user interface (gui) tool that allows you to place content on
a page just as you would see it in the browser without writing any html. The html
is written behind the scenes by the tool. This is a beautiful thing, and in the
HTML Links section of this tutorial you'll find links to some of the more popular
editors. But it doesn't help you to learn html which is what we're here for.
Most community sites (such as Blackplanet) only allow you to change the body content so don't try this on your community site page.
So without further delay let's begin. Open a new text file (in Notepad if you're using
Windows and you don't know what else to use) and type, or cut and paste
the following code...
<html>
<head>
<title>My First HTML Page</title>
</head>
<body>
<h1>Welcome to my first HTML page!</h1>
</body>
</html>
Save it as first_html.html, or whatever name you like as long as the extension
is either html or htm. (Note that if you're using Notepad, make sure the 'Save as type:' field says
'All Files' so that you can use .html as the extension.) Make sure you remember where you put the file
so that you can find it to open again. Put it in the 'My Documents' folder if you don't know were else to put it.
Now use your browser to open the file. If you're using Windows,
simply double-click on the file and it will automatically bring up the default browser
and display your page. One thing to note here, this document is only available on
your machine. That is, no one else can get to it from the internet. We'll talk about
how to put your file on the internet later.
Hopefully, what you see is something like this...
My First HTML Page
Welcome to my first HTML page!
If not, check your tag spelling and make sure the
tags are nested properly and are ended properly.
Let's take a look at the code. As we
discussed previously, the basic layout of the page contains the
<html> tag first, then the
<head> and <body>
sections, then the ending html
tag. Within the head section is the <title> tag.
Within the body section is a headline tag.
Headline tags are used to create headings.
They range from <h1> to <h6> in decreasing
size and boldness. Try changing the headline tag to <h4> and see how it displays.
Remember to also change the </h1> to </h4.>
In the next section, I'll discuss some of the common text formatting tags.
Next >> |