Local development means building and testing a website on your own computer before putting it online.
You do not need an internet connection to create a basic HTML and CSS website. Other people will not be able to visit it until you upload the files to a hosting account.
Working locally is a fast and safe way to learn because you can change the code, view the result, and fix mistakes without affecting a public website.
Steps
- Create a new folder for the website. Give it a clear name, such as
my-first-website. - Open the folder in your text editor.
- Create the two base files:
index.htmlfor the HTML andstyle.cssfor the CSS. - Add the base HTML to
index.htmland the base CSS tostyle.css. - Save both files. Make sure they are inside the same project folder.
- Open
index.htmlin a web browser. You can usually double-click the file or drag it into an open browser window. - Return to the text editor, change the HTML or CSS, and save the file again.
- Refresh the browser page to see the updated website.
The address in the browser may begin with file://. This means the browser is opening the file directly from your computer rather than loading it from a public website.
This method is enough for the basic HTML and CSS lessons. More advanced website features may eventually require a local server, but you do not need one to begin.