HTML or Hypertext Markup Language is the skeleton of every webpage. In about 5 minutes, you’ll write some yourself!
Open any plain-text editor (example: notepad for windows, textedit for Mac). Create a new file and save it as test.html. The .html extension is what tells browsers that this is a webpage.
Every html file stars with the same required boilerplate code. Copy this into your file as is. We’ll talk about what it means in a bit.
<!-- Tells the browser this is HTML5 -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>My First Page</title>
</head>
<body>
<!-- Your content goes here -->
</body>
</html>
Replace <!– Your content goes here –> on line 11 by <p>My very first webpage!</p>.
<!-- Tells the browser this is HTML5 -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>My First Page</title>
</head>
<body>
<p>My very first webpage!</p>
</body>
</html>
Save your file. Then drag index.html into any browser window, or right-click the file and choose Open with → Chrome / Firefox / Safari. You should see your heading and paragraph rendered as a real webpage.
The address bar will show something like file:///Users/you/index.html — that’s normal. You’re running it locally, no server needed.