2. Setting Up Your Development Environment
To write HTML, you only need two things: a text editor and a web browser.
2.1 The Browser
Any modern browser (Chrome, Firefox, Safari, Edge) can interpret and display your HTML code. This is how you view your work!
2.2 The Text Editor
We need a dedicated text editor, often called a Code Editor, because simple programs like Notepad or TextEdit lack essential developer features.
Recommended Editors (Free):
- VS Code (Visual Studio Code): Highly recommended industry standard. It has powerful features like syntax highlighting, extensions, and integrated terminal.
- Sublime Text: Fast and highly customizable.
- Atom: Developed by GitHub, very hacker-friendly.
Exercise: Creating Your First File
- Install VS Code.
- Open VS Code and create a new file (File > New File).
- Save the file immediately as
index.html. It is crucial that the file ends with the.htmlextension so the browser knows how to read it. - Add the text
Hello World!to your new file and save it. - Right-click the
index.htmlfile in your file explorer and choose 'Open with...' your preferred browser. Congratulations, you've created your first web page!