| ~Wildfire: > Articles > HTML Pages (June 27th 1999) | |
| ~Look at: | Articles | FAQs | Resources | Reference | | |
|
This article aims to teach you how to make your first basic web page: A titled document with some simple paragraphs and some headings. There are basically two sections to an HTML document. One is the head section where all the information about the page is stored. This information can be information about the use of other languages such as CSS and JavaScript within the HTML document, the title, description, author and keywords of the page and a bundle of other stuff. You will only need to be bothered with the title of the document in this article. The second section in an HTML document is the body section where the content is stored. Other HTML tags are in the body giving the content structure and a basic style. Lets take a look at what goes into a page in more depth... The Page InformationThe information section of a page is contained within the <HEAD> tags, but these are not the first tags in an HTML document. You need to first put in the <HTML> tags to designate the document as containing HTML code. This is set up as follows:
<HTML>
<HEAD> </HEAD> </HTML> This has created an HTML page and given it a 'head' section for us to place information in. The first bit of information we'll store there is the 'title' of the document. A title is necessary so that the user can get an idea of what the document contains without reading it all. The title appears in the title bar of the browser window. The title is nested within the <TITLE> tags. The title tags are nested within the head tags:
<HTML>
<HEAD> <TITLE>My First HTML Page</TITLE> </HEAD> </HTML> That is all that we'll put in the head section at the moment, but you will put some more information in there in preceding articles. The Page ContentThe content of the page is stored in the <BODY> tags. This is where you will find all the tags for headings, paragraphs, fonts, tables, forms etc. In this article we will deal only with paragraphs. The body tags are nested within the HTML tags, underneath the head tags:
<HTML>
<HEAD> </HEAD> <BODY> </BODY> </HTML> As you might know from a previous article titled The Basics of HTML a paragraph is created using the <P> tags. A paragraph separates text into a block and leaves a space around it from the other text. It is easy to insert a paragraph:
<BODY>
<P>This is a simple paragraph</P> </BODY> You can have as many paragraphs in a document as you want. Paragraphs may be fine but large blocks of text look ugly and are hard to read without headings. There are six different basic headings that you can use. The first is the boldest and biggest and the sixth the smallest and weakest visually. They are all created around the same basic tag. The tag is the '<H#>' tag. When you create your heading you replace the hash mark in the tag with the number of heading style you want. For the biggest heading your tag would be '<H1>' and for the smallest '<H6>'. Here is the code for a simple page including two headings and paragraphs and a simple title. You can take this code and paste it into your HTML editor and then modify it for your first HTML page:
<HTML>
<HEAD> <TITLE>My First HTML Page</TITLE> </HEAD> <BODY> <H1>My First Page</H1> <P>Welcome to my first HTML page</P> <H2>How I did it</H2> <P>I learnt how to do this from Wildfire.</P> </BODY> </HTML> Experiment with using different heading styles, but Note: heading will display slightly differently in different browsers. HTML TUTORIAL: Next Article - Formatting Text in HTML; Previous Article - The Basics of HTML |
| Top of Page | |
| ~Look at: | Articles | FAQs | Resources | Reference | | |
| © Jamie McHale 1998 - 2000 - http://www.btinternet.com/~wildfire/ |