CodeGym /Courses /Frontend SELF EN /First web project

First web project

Frontend SELF EN
Level 3 , Lesson 4
Available

7.1 First HTML document

Let's create our first HTML document (HTML file). Typically, the main HTML file of a web project is called index.html; I suggest we stick with this awesome tradition. To do this, right-click on the web-storm-10 folder:

And enter the file name:

WebStorm will create the file for you and open it right away:

This is basically an empty HTML document. Everything you see here is just boilerplate info. All the real data will be put inside the <body> and </body> tags. You'll learn more about what tags are in the next lecture.

Let's write some interesting and fancy message inside these tags. For example, something like this:

    
      The journey of a thousand miles begins with a single step!
    
  

You can just copy and paste it into line 8 (inside the <body> tags). Get used to copying text – fewer errors and typos this way. Here’s how my document looks now:

If my text isn’t mysterious and epic enough for you, pick your own—this is your first Web project after all. Here are 3 more options to choose from:

  • "The dark side offers me what the light cannot: true freedom."
  • "The dark side—is a path to power that knows no bounds."
  • "I choose my destiny, and it lies in darkness."

7.2 Running the first project

Now let's "run" our project and see how the browser displays our HTML file.

To run the project, click the green triangle in the upper menu. To the left of it, you can see the name of the file that will start executing:

You can also run your file by pressing Shift+F10.

Let's do this, and you'll see how your browser displays your first HTML file. Here's what mine displayed:

The host in the URL is written in orange — it's our project's web server launched by WebStorm.

The path in the URL is written in green — it's the path to index.html from the root of our project.

The blue color is technical info for WebStorm.

The text highlighted in red is what the browser displayed based on our HTML document.

7.3 Error handling

What happens if we make some mistake? How will the browser and WebStorm react?

Let's erase the first character on line 9 and see WebStorm's reaction. Here's what I got:

What we see here:

  1. The word on line 9 stopped being a tag, so WebStorm now colors it gray instead of yellow.
  2. On line 10, you have a closing </html> tag, but the <body> tag should appear before the closing </html> tag. So WebStorm sees an error here.
  3. The number of errors in the document is displayed in the upper right corner – we have one.
  4. The error location is also duplicated on the scrollbar—bottom right. Very handy for long documents.

Now let's run this file and see how the browser reacts to the error:

The browser also considers the incomplete <body> tag to be just text, so it displays it as regular text.

The lack of a closing </body> tag didn’t faze the browser either: there can be even worse tag issues. Overall, it turned out pretty decent.

1
Task
Frontend SELF EN, level 3, lesson 4
Locked
Share who you want to be
Share who you want to be
1
Task
Frontend SELF EN, level 3, lesson 4
Locked
Plugin Installation
Plugin Installation
1
Task
Frontend SELF EN, level 3, lesson 4
Locked
Ask a question on Help
Ask a question on Help
Comments (15)
TO VIEW ALL COMMENTS OR TO MAKE A COMMENT,
GO TO FULL VERSION
Mirna C. Level 73, United States of America, USA
17 December 2025
I would love to become a skilled computer programmer.
Ant3at5r Level 5, United States
14 December 2025
I want to build websites
leonardo_1313 Level 5, Galway, Ireland
24 November 2025
Let's see where this takes me :)
Mirko Mirxas Level 23
22 November 2025
I am here just for fun :) Men shouldn't expect too much from life. Lower the expectation, higher the happiness :)
narendrajonnalagadda Level 21, CodeGym University in India, India
27 September 2025
i want to see myself in a good position in a reputated company .
madhan Level 48, Hyderabad , India
17 July 2025
i want to become a employe at good position in a reputated company
Kae Clayton Level 8, Naples, United States
9 July 2025
I am still figuring out what I want to do with programming. I am not sure which aspect I want to focus on just yet.
Anonymous #11655448 Level 4, New York City, United States
10 June 2025
I see myself becoming an engineer and a video game designer programming in many ways. I'll work for different railroads, and make many good games.
Bekir Sami Polat Level 6, Saratoga Springs, United States
31 May 2025
Let's get started
17 May 2025
Penaldo of web dev