Set Up Your First Website
These pages show you how to create the basic files for a website, edit them on your computer, and put them online.
You do not need to complete setup before starting the lessons. Use this section when you are ready to move beyond examples and work on your own website files.
Base Files
Start with the two files used by a basic website: index.html for the page and style.css for its appearance. Learn how the files connect and why keeping them separate makes a project easier to manage.
Base HTML
Learn the starting structure of an HTML page, including the <head>, the visible <body>, the page title, and the link to your CSS file.
Base CSS
Learn a small set of CSS rules that gives a new website predictable sizing, readable text, responsive media, and a simple starting layout.
Text Editor
Learn why code needs a plain text editor and how a tool like Visual Studio Code helps you create, organize, and edit website files.
Local Development
Learn how to build on your own computer. Edit the files, save your changes, open index.html in a browser, and refresh the page to see the result.
Hosting
Learn how hosting stores your website online, how a domain points people to it, and how your local files are uploaded to the public site.
How The Pieces Fit Together
- Create
index.htmlandstyle.css. - Add the base HTML to
index.htmland the base CSS tostyle.css. - Edit and save them in a text editor.
- Open
index.htmlin a browser to test the website. - Upload the files to hosting when you are ready to share the site.
If you are new to code, start with the HTML lessons and then move into CSS. When you are ready to build your own files, begin with Base Files.