CSIS 103 Introduction to the Internet

Lesson 8-4

Creating an HTML Document

Now that you understand the page that you will create and its elements, you will begin creating it using Notepad or another text editor.

To start Notepad and create the HTML document:

-1-

If you are using a device with Windows click the Start button and type Notepad in the Search box, and then press the Enter key or click Notepad in the list. Notepad starts and opens a new document, titled “Untitled.”

Tip: If you do not have Notepad on your device, you can use any word-processing program to create an HTML document.

Trouble? If you don’t have the starting Data Files for this module, you need to get them before you can proceed. Your instructor will either give you the Data Files or ask you to obtain them from a specified location (such as a network drive). In either case, make a backup copy of the Data Files before you start so that you will have the original files available in case you need to begin again. If you have any questions about the Data Files, see your instructor or technical support person for assistance.

-2-

If necessary, maximize the Notepad window.

-3-

Click File on the menu bar, click Save to open the Save As dialog box, and then navigate to and select the Module.08\Module folder included with your Data Files. You will store your HTML document in this location. 4 If necessary, select any text in the File name text box, and then type women_sd.html. sidenote Tip: Make sure that you save your HTML documents with the filename extension .html; otherwise, some browsers might not recognize the file as a webpage. 5 Click the Save button. The title bar now displays the filename women_sd.html. You created a text file with the .html filename extension; the .html filename extension identifies the file as a webpage. (Sometimes you will see the .htm filename extension used for a webpage, which is also correct. In this book, you will use the .html filename extension.) Proskills Decision Making: File Naming Conventions for HTML Documents When creating a website for the first time, following some common file-naming conventions when naming your webpage files will ensure that your website is easy to use and manage. Different organizations might use their own in-house standards to ensure a well-organized site. Some common rules for naming files are as follows: When saving HTML documents, consider using all lowercase letters in the filenames. Although most web servers can process uppercase and lowercase letters as the same characters, it’s a good practice to use lowercase letters in filenames in case you move your website to a server that processes letters differently. Avoid using spaces in filenames. Some web servers do not support filenames that contain spaces, and some browsers do not correctly convert the space character to its URL-encoded equivalent, which appears as %20, resulting in problems when users attempt to access the page. A commonly used option for making filenames easier to read is to separate words with underscore characters. For example, use the filename “about_us.html” instead of “about us.html” or “aboutus.html.” Choose filenames that reflect the file’s contents to make it easier to recognize its use. When the organization that operates a site has specific conventions, be sure to understand and follow them. For example, an organization might store all of a site’s images in a folder on the server named “images.” Choose short filenames to make it easier for users to type specific URLs into the browser’s address bar, and avoid using abbreviated filenames that are difficult to remember. Use the filename index or default (and the appropriate filename extension) for a site’s home page so the web server sends the correct home page for your site when a user accesses the site using only the domain name. For example, when a user types the domain name www.cengage.com in the browser’s address bar instead of the domain name and a filename (www.cengage.com/index.html), the server will automatically search for a file named “index” or “default,” and then it will send that file in the browser. When the home page is named using a nonstandard filename, such as “cengage_home.html,” the web server will not be able to locate a file named “index” or “default” and will display an error page or a directory listing of the website’s contents instead of the site’s home page. The key to good website development is to make sure that you understand and follow any file-naming conventions that are required, either by the organization or based on the type of server that stores your site.