HTML Setup
| <!DOCTYPE html> | Declare page as HTML5 |
| <HTML> | Begin HTML Page |
| <HEAD> | Begin Header section |
| <LINK rel="stylesheet" type="text/css" href="my.css"> | Include an external cascade style sheet (CSS) |
| <TITLE>page name</TITLE> | Page name displayed on the browser's tab |
| <STYLE> body { Background-color: lightsteelblue; } </STYLE> |
Define a cascade style sheet (CSS) |
| <SCRIPT src=myFirst.js></SCRIPT> | Include external JavaScript |
| <SCRIPT> function myClick() { alert('Hello world'); } </SCRIPT> |
Include JavaScript |
| </HEAD> | Terminate the Header Section |
| <BODY> | Begin the Web Page |
| --- TODO-- add your HTML here ---- | Web page content |
| </BODY> | Terminate the Document |
| </HTML> | Terminate the Page |
This is the basic HTML page setup. At a minimum, none of this is required (i.e. an empty file will display a blank page)
The <HEAD> </HEAD> section contains HTML supporting tags (not shown on the screen)
The <BODY> </BODY> section contains your HTML text and images (what's on the screen)
Tags <tagName> generally define a start and end to a section. The <BR> and <LINK> tags do not have a closing tag.