new html page code example

Example 1: simple html website coding

<!DOCTYPE html>
<html>
<head>
<style>
body {background="purple";}
</style>
<title>Page Title<title>
</head>
<body>
<h1>Yay</h1>
<p>yay is a word used to describe that your happy!</p>
</body>
</html>

Example 2: create page html

<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>

<h1>This is a Heading</h1>
<p>This is a paragraph.</p>

</body>
</html>

Example 3: html new page

<!DOCTYPE html>
<html>

<head>

</head>

<body>

    <h1>The a target attribute</h1>

    <a href="https://www.w3schools.com" target="_blank">Visit W3Schools.com!</a>
    <p>thank you w3schools :)</p>
    <p>If you set the target attribute to "_blank", the link will open in a new browser window or a new tab.</p>

</body>

</html>

Example 4: how to create a html file

Make a folder
Create a file with .html at the end of it and open it with a text editor

Tags:

Misc Example