HTML course menu
Getting Started with HTML: Code Editor, Browser and Developer Tools
Set up everything you need to write HTML: choose a code editor such as VS Code, create and open an .html file in your browser, reload to see changes, and inspect pages with browser developer tools.
On this page
HTML needs no compiler and no installation. You need two things you probably already have: a text editor to write the file and a web browser to view it.
1. A code editor#
Any plain-text editor works, but a code editor colours your code, auto-completes tags and catches typos. Popular free choices:
2. A browser#
Use a current version of Chrome, Edge, Firefox or Safari. All modern browsers display standard HTML the same way.
3. Create and open a file#
- Make a folder for your practice files, for example
html-practice. - In your editor, create a new file and save it as
index.htmlinside that folder. The.htmlextension is what tells the computer it is a web page. - Type this line and save:
<h1>It works!</h1>- Open the file in your browser. Double-clicking
index.htmlusually works; you can also drag the file onto a browser window.
The browser shows a large heading. The address bar starts with file:///, which means the page came from your own computer, not a server.
4. Edit, save, reload#
This is the loop you will repeat all the time:
- Change the HTML in your editor.
- Save the file (
Ctrl+Son Windows and Linux,Cmd+Son macOS). - Reload the browser tab (
F5orCtrl+R, orCmd+Ron macOS).
5. Developer tools#
Every desktop browser includes developer tools. Right-click anything on a page and choose Inspect, or press F12 (Cmd+Option+I on macOS).
- The Elements panel (called Inspector in Firefox) shows the page's HTML as a tree. Hover over an element to highlight it on the page.
- You can edit HTML there to experiment. Changes are temporary and disappear on reload.
- The Console panel shows errors and is where you will run JavaScript later.
Try it on any website: right-click a heading and choose Inspect to see the HTML behind it.
Using this site#
Every example in this course shows the code and a Result frame. The result is rendered live by your browser, so it is exactly what you would see if you saved the code in a file and opened it. Copy any example with the copy button and try changing it.
Practice#
Practice exercise
Create about.html in your practice folder containing <h1>About me</h1> followed by <p> with one sentence about yourself. Open it in your browser, then change the sentence, save and reload.
Show solution
<h1>About me</h1>
<p>I am learning HTML so I can build my own website.</p>Key takeaway#
Finished this lesson?