Skip to content

Try our new Crash Courses!

Become a member using the button below to hide this banner and gain access to our new Crash Courses.

Creating an HTML file

Summary

The file extension for HTML files is .html.

Details

To create a new HTML file in VS Code, click the New File button to create a new file and then save it. In the dialog that pops up, give it a name and add the .html file extension at the end.

The home page for your website is usually given the name of index.html. Other HTML files for a website can have more descriptive names, like about.html or contact.html.

If your file name needs to contain multiple words, use hyphens to separate the words, like about-us.html or contact-us.html.

Exercises

Create an index.html file in the creating-html-files folder. Then, try creating an about.html file as well.

References

Dealing with files on MDN

Lesson tags: Open Lesson
Back to: HTML Reference > HTML Introduction