How to Write Code in Visual Studio Code

Creating an HTML Document

How to Write Code in Visual Studio Code: Let’s create the first HTML document for our website.

If you prefer, you can also watch the tutorial video below:

  1. Create a folder on your computer for your project. Name the folder test (or anything you want).
  2. Open VS Code.
  3. Open the File menu and select Open Folder … . Browse for the folder you created and open it.

4. Right-click underneath the folder and select New File. Name the file index.html.

5. Presently you have a blank text file named index.html.

What is index.html?

Index.html is the first HTML page you create as you’re building a site. HTML ( HyperText Markup Language) helps give structure to your text and different elements on a webpage. The index.html page is the default page a website visitor sees if no other page is specified, which is often referred to as the “homepage”.

For instance, in the event that you type in a URL like, you have not specified any specific page the server ought to convey to the client (computer or mobile phone). Much of the time, what you will see then, at that point, is the default page, or index.html page.

In the event that you know the specific address of the page you want to view, like, then, at that point, the server will direct you to that page rather than the index.html page.

index.html is easily recognized on most servers as the default page, which is the reason many developers decide to go with index.html as the default page name.


How to Download and Install Visual Studio Code

Thanks for reading! We hope you found this tutorial helpful and we would love to hear your feedback in the Comments section below. And show us what you’ve learned by sharing your projects with us.


Leave a Reply

Avatar placeholder