A browser can display a web page created with a plain text editor. HTML defines its structure, CSS controls its appearance, and JavaScript adds interactive features.
Windows Notepad can create a complete HTML document because HTML is written as plain text. You can type the markup, save the file with an .html extension, and open it in a browser.
You can write CSS directly inside an HTML document by using the style element in the head section. The browser applies the CSS rules when it displays the document.
The following complete example combines a page structure with an external stylesheet. It creates a simple landing page with a header, a main content area, and a button.
Visual Studio Code is a free source code editor suitable for HTML, CSS, and JavaScript projects. It offers syntax highlighting, code completion, file navigation, and an integrated terminal.
Nano is a terminal based text editor available on many Linux distributions. Open a terminal and move to the directory where you want to store your website. Press Ctrl and O to save the file, confirm the file name, and press Enter.
An online editor can be useful when you do not want to install an application. Services such as CodePen and JSFiddle let you enter HTML, CSS, and JavaScript in separate panels and view the result in a browser.
A responsive page adjusts its layout to different screen sizes. The viewport metadata and CSS media queries help the browser display content appropriately on phones, tablets, and desktop screens. Add this metadata inside the head element:
Check that the script file exists and that the src value points to the correct location. Open the browser developer tools and inspect the Console for errors.
How to create a web page using HTML with practical code examples