Creating your HTML Document
Goals: Create a static HTML document and view it in a web browser.
In this section, we will create your first (static) HTML document and test it in the web browser.
Create our project entry point
The project we create in this tutorial will live in a folder, often referred to as a directory when it lives on a web server. When you host a website, your files will live in a directory (folder) on the computer that is acting as a web server, which is hosting your domain.
Unless we specify a custom default entry point, the default page the browser will try to render is a file named index.html.
HTML script we wrote in the file index.html
<!DOCTYPE html> <html> <head> <title>Hello World!</title> </head> <body> <div id="intro">Hello World!</div> <div id="context1"></div> <div id="context2"></div> <div id="context3"></div> </body> </html>
Example of rendered page
Completed files from this step:
Glossary of useful terms
- Directory – folder on a computer
- Web Server – a computer configured to share a web page. This could be a folder on your computer that you use for testing and development, or it could be a folder on a remote web host you pay to house your website.
- Domain – your web URL (Uniform Resource Locator), the web address that points to your Web Server