Welcome to my 2nd lesson in HTML. Today, I will explore the different options for compiling and running your program.
When I was first introduced to coding, I wrote and ran a webpage that read “Hello, World.”** It was so cool to see these words print on the screen, since I commanded them to appear. Computers are essentially bits of metal and plastic that cannot do anything unless told specifically by the programmer – and in this case, me!
The easiest way to compile HTML code is in the standard Notepad program, (or Text Edit if you are on an Apple.)
The Steps to Compile “Hello, World” in a web browser.
1. Open Text Edit or Notepad on your computer.
2. type in:
<h1> My First WebSite </h1>
3. Click “File” — “Save As (somename).html. It’s very important to save the file as a .html file for this to properly work. The default is a txt (text)file. Additionally, save it on your Desktop, rather than imbedded into a folder.
4. Once you have saved your work, go to your Desktop and you will now see a file with an icon such as below if you are using either Chrome or FireFox.
5.Doubleclick the icon and a new web browser should appear! Congrats this is your first website!
**Some cool computer science info: Hello, World is supposedly the first words printed in a computer program. While this can’t actually be proven, it’s a fun legend and nearly all books and courses will have you type “Hello, World” as your first program.