Tim Berners-Lee published the first website in 1991. This simple, text-based page still exists online. With its two-dozen links, it introduce people to the World Wide Web.
2.3: Getting started with code
3. Create a minimal HTML5 page
Keep in mind that HTML5 documents are plain text: no formatting, no fancy fonts. When you save your HTML5 document, you save only a stream of text.
Follow these steps to get started:
- Open a new document in your text editor and immediately save it to your storage with the name index.html
- The first page in any website folder is ALWAYS named index.html
- Any future pages should have simple, easy to remember names that describe what the page is about; remember, you’ll have to use this name over and over again as you link other pages to it.
- Use the KISS concept in naming your files.
- Begin writing your code by following the code from the minimal HTML5 page. It contains the elements every HTML5 file must contain.
- Write your content and give it structure using heading tags (h1, h2, etc.), paragraph tags, list tags, images and anchors. For your first progress check, write one or two strong paragraphs introducing yourself.
- Save and check your page.
4. Check your file
Your HTML5 document in plain text will look like so many letters and numbers. To see how it will look on the Web, you have to preview it in your Web browser.
To preview your page:
- From your text editor, SAVE your HTML5 file.
- Open your browser program.
- Under the FILE menu of your browser, go to FILE→OPEN (it might say OPEN FILE or OPEN DOCUMENT).
- You should see a dialogue box that allows you to find your HTML5 file. Navigate to your production folder and open your file.
- Your page should appear in the browser window.
- Read your page in the browser and check for errors.
- Switch back to your text editor and fix any errors.
- SAVE your HTML5 file in your text editor.
- Switch back to your browser and RELOAD or REFRESH the window.
- Repeat Steps 3, 4 and 5 as you continue to build your website.