A Simple Page
Code, examples & explanations for your first webpage and some simple features.
What
Your first simple webpage
Code
<html>
<head>
<title></title>
</head>
<body>
Place your content here, within the body tags.
</body>
</html>
Example
Plain text page - in a new window
How to do it
All you need to do is copy the code (from the box), paste it into a blank NotePad document and "Save As..." page1.html.
Now find page1.html (where you saved it) and open it. It should open in a browser window (Internet Explorer / Firefox / etc.) and will look like the Example above.
'Right-click' on the page you have made, 'View source' and you will see the page as code (in Notepad).
What you have done
You should first notice that all of the <tags> come in pairs. For every tag you open tag you must also close it.
i.e. Open: <html> Close: </html>
Now for the tags and what they do:
<html></html> is the main tag that declares the language of the page. This tells the browser what to expect and contains all of the page code (some exceptions do exist, but will be explained when we come across them).
<head></head> is used to place hidden code and declarations. This is extremely important and is used to describe the page, title the page and call for external code.
<title></title> is placed inside the <head> and is used to place text in the Title Bar of the browser.
<body></body> contains everything that is shown on the actual webpage.
> Next Part Two - Writing a page Title and adding content.
Or jump to: Begin | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8
