Your First Web Page: Hands-On Practice 1.1
Your First Web Page: Hands-On Practice 1.1
No special software is needed to create a web page document—all you need is a text
editor. The Notepad text editor is included with Microsoft Windows. TextEdit is distributed
with the Mac OS operating system. An alternative to using a simple text editor or word
processor is to use a commercial web authoring tool, such as Adobe Dreamweaver. There
are also many free or shareware editors available, including Notepad++, Brackets, Visual
Your First Studio Code, and BBEdit. Regardless of the tool you use, having a solid foundation in HTML
Web Page will be useful. The examples in this book use Notepad.
FIGURE 1.11
Your first web
page.
Create a Folder
You’ll find it helpful to create folders to organize your files as you develop web pages
and create your own websites. Use your operating system to create a new folder named
chapter1 on your hard drive or on a portable flash drive.
To create a new folder on a Mac:
1. In the Finder, go to the location where you’d like to create the new folder.
2. Choose File > New Folder. An untitled folder is created.
3. To rename the folder with a new name: select the folder and click on the current
name. Type a name for the folder and press the Return key.
Notice that the first line in the file contains the DTD. The HTML code begins with an open-
ing <html> tag and ends with a closing </html> tag. The purpose of these tags is to indi-
cate that the content between the tags makes up
a web page.
The head section is delimited by <head> and
</head> tags and contains a pair of title tags
with the words “My First HTML5 Web Page” in
between along with a <meta> tag to indicate the
character encoding.
The body section is delimited by <body> and
</body> tags. The words “Hello World” are
typed on a line between the body tags. See
Figure 1.12 for a screenshot of the code as
it would appear in Notepad. You have just
created the source code for a web page FIGURE 1.12 Your web page source code displayed in
document. Notepad.
Sample solutions for Hands-On Practice exercises are available in the student files. If you
would like, compare your work with the solution (chapter1/index.html) before you test
your page.
Why should I create a folder, why not just use the desktop?
Folders will help you to organize your work. If you just used the desktop, it would quickly
become cluttered and disorganized. It’s also important to know that websites are organized
on web servers within folders. By starting to use folders right away to organize related web pages, you are
on your way to becoming a successful web designer.
FIGURE 1.14 Web page displayed by Microsoft Edge. Courtesy of Microsoft Corporation.
When I viewed my page in a web browser, the file name was index.html.html—why did
this happen?
This usually happens when your operating system is configured to hide file extension
names. You will correct the file name, using one of the following two methods:
◗ Use the operating system to rename the file from “index.html.html” to “index.html”.
OR
◗ Open the index.html.html file in your text editor and save it with the name “index.html”.
It’s a good idea to change the settings in your operating system to show file extension names. Follow the
steps at the resources below to show file extension names:
◗ Windows: http://www.file-extensions.org/article/show-and-hide-file-extensions-in-windows-10
◗ Mac: http://www.fileinfo.com/help/mac_show_extensions