HTML PAGE STRUCTURE


<!DOCTYPE html >
<html>
<head>
. . . header elements go here . . .
</head>
<body>
. . . the main web page content goes here . . .
</body>
</html>

A VERY SIMPLE WEB PAGE

<!DOCTYPE html>
<html>
<head>
<title> First Web Page </title>
<meta name="author" content="Daniel">
</head>
<body>

<h1>My First web page heading </h1>
<p>My first web page paragraph.</p>

</body>
</html>

Copy above code & try it into your natepad


Browser View Screen Below:

First Web Page


Code that goes in head

Anything in <head> is information about the web page, and does not usually get shown in the page

The two lines in <head>

<title>A Simple Web Page</title>

<meta name="author" content="Daniel">

These state the title and author.


H1 AND P

<h1> means level 1 heading

<h1> My first web Page heading </h1>

<p> means paragraph

<p> My first web page paragraph </p>


Other thing you might use in head

<style>body {backgroundcolor:yellow}</style>

<link rel="stylesheet" href="stylerules.css">

<script> function surprise() {alert("Hello!");} </script>

<script src="mycode.js"></script>


Other meta information

<meta name="description" content="An example">

<meta name="keywords" content="HTML, CSS, JavaScript">

<meta charset="UTF8">


The location of the main file

<base href="http://www.demo.com/" target="_blank">


ATTRIBUTES

You need to use speech marks for any HTML attributes:

<meta name="author" content="Daniel">

Double speech marks " and single speech marks ' are both OK:

<meta name='author' content='Daniel'>



Copyright © 2020. All rights reserved.