In this course, all the code we write will be run within a web browser of your choice. Luckily, you already have one installed! Or else you wouldn't have been able to read this.
What Web Browser to Use
The big web browsers out there are Google Chrome, Microsoft Edge, and Apple's Safari. There's also some more fringe browsers which have been gaining in popularity, like Opera GX. There are very subtle differences in terms of how code is run on each of these. It used to be a far bigger issue for developers to navigate these differences, but a lot of features are shared across major browsers nowadays. We'll be using Google Chrome in various screenshots in this course, but truly it doesn't matter much which browser you choose.
We'd give installation instructions for a web browser of your choice, but the fact that you're reading this on our site means you already have that taken care of!
Understanding Web Browsers
Web browsers are simply applications that allow users to see output from certain file-types. Web browsers interpret the content of certain types of files, and displays them in different ways. We'll get into how web browsers manage to do this later.
For now, though, the important thing to know is that these files generally are HTML, CSS, and JavaScript files. Web browsers use a host of other file types, but these are the core ones that get presented to users.
This is useful for us as developers, but it gives us an easy way to see what our software is doing. All we have to do is write to these types of files, files that exist just on your computer, and then view them in a web browser. This will simulate how websites serve out content to users, and is a great way for us to see what's going on with websites under the hood.
Viewing our first HTML files
Let's put our web browser to work. If you follow the following steps, you'll be able to see an HTML file show up in your web browser.
- Open your Text Editor of choice from the previous lesson
- Create a new file. In this example, we're showing an empty folder in VS Code.
- Name the new file
example.html
. Note the.html
file extension. This is how your browser will know that this is an html file
Once you have this new file open in your Text Editor, we can add the following content to it:
Hello World!
iNoteHello World!
is a very famous line to put in code when you're trying things for the first time! You will see it a lot in our courses, and is even a phrase used by professionals when trying to build basic software for the first time.
Depending on your Text Editor, there's different ways to view this file in the browser. Possibly the simplest way is to navigate to where that file was created on your file system, right-clicking, and choosing to Open With
your Web Browser of Choice
You should be able to see your Hello World!
message in your Web Browser!
iNoteIf you're not seeing your file anywhere, there's a chance that your folder that you made in your Text Editor is creating files in an odd location. Developing is all about problem solving, so explore your Text Editor's documentation to see where those files might ending up. If you still can't figure it out, feel free to repeat all the above steps with Notepad instead.
You're all set up!
Congratulations on completing your set up of your development environment. In the next chapter, we'll start writing code that will be the building blocks for any website you want to create!