The source code
- Code:
-
<html>
<!-- First Webpage in HTML -->
<title>Hello World!</title>
<body>
<h2>Hello World!</h2>
<hr>
<p>This is a webpage!</p>
<hr>
</body>
</html>
What does it all mean?
HTML works around things called tags. These start with <tagname> and end with </tagname>. The ones used in this example are:
<html> - Indicates that what follows is HTML code
<title> - Appears as the page title
<body> - The main body of the webpage
<h2> - Creates a heading, bigger than normal text
<hr> - Draw a horizontal rule
<p> - New paragraph
Also note the way comments are formed, in the second line. These do not appear on the page.
How do I view the page?
Easy. Open up notepad, enter the code, and save as 'webpage.htm'. There are special HTML editing programs, but notepad will do for now!