HTML LEARNING PATH
2.1 Creating a Web page
WHY
HTML is used to display content in websites across any browser on the internet. The <html> open and close tag tells the browser about the beginning and end of a web page. The second tag in the code example is the <body> tag. Content between the opening and the closing body tags are shown in the main area of the web browser.
HOW
To create a webpage using HTML, you only need a text editor and a browser to view and test your web page. Use any free text editor you prefer. Notepad++ is a free text editor for Windows you can download and install. Text Wrangler is a free MAC compatible browser. To test a web page you’ve created, click the refresh icon on the top of your browser. Whenever you make changes, you need to save the document and refresh to see the updated.
GLOSSARY
text editor is a software application for editing code.
Notepad++ is a free text editor for Windows.
Text Wrangler is a free MAC compatible browser.
TIPS AND RESOURCES
PRACTICE
How to use HTML to create a webpage.
Begin by creating a folder on your computer for your project. Name the folder MyWebsite (or anything you want). Open Text Wrangler (or your code editor of choice). Choose Save As. Name the file “index.html”. Now you have successfully created a blank text file named index.html that will be your first web page.
Type the following lines of HTML:
<html>
<head>
<title>My First Website!</title>
<meta charset="UTF-8">
</head>
<body>
</body>
</html>
Save the file.
Web pages with names like index.html have special meaning. If a website address is called, for example http://mywebsite.com
, the index.html file is automatically displayed first, which in this case is http://mywebsite.com/index.html
. For our website, index.html will become our home page.