HTML Lesson Two: Text Editors for HTML

html-154434_1280Welcome 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!

File:Notepad.png

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:

<DOCTYPE html>

<html>

<body>

<h1> My First WebSite </h1>

<p>

Hello, World!

</p>

</body>

</html>

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.

myHTMLcapture

myHTML

5.Doubleclick the icon and a new web browser should appear! Congrats this is your first website!

page

**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.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s