Page 34 - DCAP202_Fundamentals of Web Programming
P. 34
Unit 3: HTML Command and Structure
<head> Notes
<title>This is my very first HTML document</title>
<meta http-equiv=”content-type” content=”text/html;
charset=ISO-8859-1">
</head>
<body>
<p><h1> Here is where the actual content of the page goes.
Note that it does not matter where I start a new line...
or wether we leave space between two lines. </p></h1>
</body>
</html>
This will result in the following page being displayed in your browser as shown in Figure 3.1:
Figure 3.1: Output
If you want to leave yourself notes in an HTML document, but don’t want those notes to show up
in the browser window, you need to use the comment tag. To do that, you would do the
following:
<!— This is a comment. —>
Steps to run this example
1. Save the above example as HTMLExample.html.
2. Open the browser.
3. Open the file by browsing it
4. Get the output
3.1.2 Headers
Heading structures are most commonly used to set apart document or section titles.
There are six levels of headings, from heading 1 through heading 6. Heading1 (h1) is “most
important” and heading 6 (h6) is “least important.” Bydefault, browsers will display the six
heading levels in the same font, with the point size decreasing as the importance of the heading
decreases. Here are two examples:
<h1>Heading 1: The largest</h1>
<h6>Heading 6: The smallest</h6>
LOVELY PROFESSIONAL UNIVERSITY 27