Logo Explosvie Information for Webmasters

Adding Headings and Paragraphs

<html>

<head>

<title>Your title goes here</title>

</head>

<body>

</body>

</html>

KEY:

  • The grey text indicates what you have alreadty done, it is compressed from here on in order to save space. Do not alter yours.
  • Blue indicates what you need to add to your pages this lesson.
    • The deep blue represents the new HTML tags.
    • The pale blue the text you need to replace with you own words.

Note:

The web browser ignores all spaces, except one between each word and all carriage returns (Enter key on your keyboard). It gets all formatting information from the HTML tags. So you may write your code as one long line or break it up as you wish. However, it makes sense not to use a carriage return in the middle of a tag.

<html><head><title>Your title goes here</title>

<body>

<center>

<h1>Your page heading here</h1>

<h2>Your sub-heading<h2>

<p>Your paragraph here</p>

</center>

</body></html>

You can now add a page heading. Place your heading inside a pair of <h1> </h1> tags, inside the body section of the page. <h1> is the largest heading size and <h6> is the smallest (it is smaller than the paragraphs). From now forward <hn> indicats a heading size of your choice, replace the "n" with a number between 1 and 6. <hn> tags create a blank space below the heading.

Paragraphs are formatted with a pair of <p></p> tags. This automatically forces a blank line before the paragraph.

A pair of <center></center> tags are used to center a block of headings or paragraphs on the page. Here the whole page is centered, but whatever you enclose by the tags will be centered. This is not used for individual headings or paragraphs as there is a better alternative (coming later).

Note the US spelling of center - centre will not work.

You may now add further sub-headings and paragraphs to create your page.

Remember!! For now keep all your code inside the body - until you learn a lot more only the title goes in the head.

Previous Page   Next Page

 


UK Shopping Online


Counter