Creating Your First HTML Page
Last update on: 05-12-2008Open your text editor and type the following code. You don't have to understand what any of it means at this point. This simple example is just to get you started.
After you create your HTML file, save it to your hard disk. Remember that the best way to learn is to type your code and use a simple text editor such as Notepad but if you're using a word processor like Microsoft Word, choose Save As and make sure that you're saving it as "Text Only". When you choose a name for the file, follow these two rules:
- The filename should have an extension of .html (.htm on DOS or Windows systems that support only three-character extensions)for example, myfile.html, text.html, or index.htm. Most web software requires your files to have these extensions, so get into the habit of doing it now. (If you are using Windows, make sure that your computer is configured to show file extensions. If it isn't, you'll find yourself creating files named things like myfile.html.txt, which your browser will not think are HTML files.)
- Use small, simple names. Don't include spaces or special characters (bullets, accented characters) just letters and numbers are fine.
Viewing the Result
Now that you have an HTML file, start your web browser. You don't have to be connected to the Internet because you're not going to be opening pages at any other site. Your browser or network connection software might complain about the lack of a network connection, but you should be able to work offline.
Text Formatting and HTML
When an HTML page is parsed by a browser, any formatting you might have done by handthat is, any extra spaces, tabs, returns, and so onis ignored. The only thing that specifies formatting in an HTML page is an HTML tag. If you spend hours carefully editing a plain text file to have nicely formatted paragraphs and columns of numbers but don't include any tags, when a web browser loads the page, all the text will flow into one paragraph. All your work will have been in vain.
The advantage of having all white space (spaces, tabs, returns) ignored is that you can put your tags wherever you want. The following examples all produce the same output. Try them!.
HTML XHTML and CSS's lessons:
Introduction To HTMLFrom HTML To XHTML
Inside An HTML File
Creating Your First HTML Page
Intergrate CSS

