You don't need a special tool for making HTML. We can write HTML by hand using tools such as NotePad on Windows, or TextEdit on the MacOS. However you should choose an editor that allows you to save a page in the UTF-8 encoding (see more details below).
Web developer often use HTML editors:
Although the HTML markup of a web page can be written with any text editor, specialized HTML editors can offer convenience and added functionality. But, I recommend that you use plain text editor. Because I think this is the best way to acquire the HTML.
Let's make a HTML document.
1. Open the NotePad(Windows users) or TextEdit(MacOS users).
2. Write the following example.
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>Sample Web page</title> </head> <body> <p>Hello!</p> </body> </html>
Note: Don't worry. You will learn the about these tags in the next chapter.
Saving the file
When you save the HTML document, you should follow the following two sections.
File name's rules are as follows:
- use either the ".htm" or the ".html" file extension.
- use only alphabets, numbers, "-(hyphen)" and "_(underscore)".
There are two works for the setting of the character encoding.
1. The markup within the document must properly designate the encoding.
2. The file, itself, must be saved in the proper encoding format.
The explanation of first point is learnt in the following chapter. In this chapter, you will learn second point. That is, setting the character encoding of the html document file.
- Character encodings for beginners
- Handling character encodings in HTML and CSS
- Setting encoding in web authoring applications
try it (Notepad)
1. Click on the "File" menu and then on "Save as".
2. Select "UTF-8" in the dropdown menu of the "Encoding".
3. Put in the file name. In this example, "index.html".
try it (TextEdit)
1. Click on the "TextEdit" menu and then on "Preferences".
2. Click on the "Open and Save" tab.
3. Select "UTF-8" in the dropdown menu of the "Encoding".
4. Click on the "File" menu and then on "Save".
5. Put in the file name. In this example, "index.html".
Web browser is a software application for viewing the Web pages. There are a lot of kinds of Web browser and be used by each favor of the person who sees the Web pages:
- Internet Explorer(Microsoft)
You should check whether the Web page is correctly made by two or more Web browsers.
See also Web Browser Share.
Let's view your HTML document on the Web browser.
1. Open the Web browser that you like.
2. Drag & Drop the HTML document file to Web browser.
Can you view the your HTML document?
In the next chapter, you learn about HTML tags. "HTML Document"