Create a Basic Web Page with HTML
Creating a basic web page is very easy and all you need is a text editor. You can type the code straight into the editor and save the file as an *.html document. So, how to create a basic web page with HTML?
Start the document with doctype and HTML tag
<!DOCTYPE html>
<html>
Add tags for web page head and body
<head>
</head>
<body>
</body>
Fill the head with a title
<head>
<title>Basic HTML Web Page</title>
</head>
The head is a container for web page metadata. It is a data about the HTML document and it's not displayed on the page. In the head, you mostly find title, styles, scripts, and other meta information.
Start filling the body
<body>
<h1>This is first headline</h1>
<p>This is first paragraph.</p>
<h2>This is second headline</h2>
</body>
Add some more text, hyperlinks and close the HTML tag
<p><i>This is text in italic</i> - this is not.</p>
<h2>This is third headline</h2>
<p>But it looks just like second, because it has the same style as second headline.
<a href="#">This is a hyperlink that leads to nowhere because it's destination is just #.</a></p>
Remeber: the document ends with closing the body and html tags
</body>
</html>
This is the final result of the basic web page
<!DOCTYPE html><html>
<head>
<title>Basic HTML Web Page</title>
</head>
<body>
<h1>This is first headline</h1>
<p>This is first paragraph.</p>
<h2>This is second headline</h2>
<p><i>This is text in italic</i> - this is not.</p>
<h2>This is third headline</h2>
<p>But it looks just like second, because it has the same style as second headline.
<a href="#">This is a hyperlink that leads to nowhere because it's destination is just #.</a></p>
</body>
</html>
Last update: 2019-01-10 (Y,M,D)