Skip to Main Content or Page Contents
Exercise - Headings, Sub headings & Paragraphs
Headings, Sub headings & Paragraphs Explanation
<mark> Highlight text </mark>
In this lesson you will learn how to change the appearance of your page by some very east to use HTML Tags.
The
So far the 2 web pages you have produced are displayed using the default settings of your browser. You will soon be learning methods of changing these default settings to something of your own choice.
Some of the methods that have been used for a long time to produce the effect that you require are being replaced by newer methods that use Style Sheets. Some of the older methods are said to be Deprecated these will be pointed out.
John McGuinn
<h1> <h2> <h3> <h4> <h5> <h5> <p>
<h1>Heading 1 example.</h1> <p>This is in a paragraph</p> <h2>Heading 2 example.</h2> <p>This is in another paragraph</p> <h3>Heading 3 example.</h3> <p>This is my third paragraph</p> <h4>Heading 4 example.</h4> <p>Here is the fourth paragraph</p> <h5>Heading 5 example.</h5> <p>Followed by the fifth paragraph</p> <h6>Heading 6 example.</h6> <p>Finally the last paragraph</p>
Reduced size image of Result
The headings and paragraphs are at there default settings for text colour, font used, text size and wether bold or normal.
Note how the heading sizes become smaller and are displayed in a bold style. Headings 5 & 6 are normally smaller than the default paragraph size.
Below you will start to learn how to change these default setting
Start with the HTML code from the end of the previous exercise.
Emphasise the single words 'default', 'centre', right'' and 'left' using a different element each time from the following elements
B EM I and STRONG.
Emphasise the single word 'American' nesting 2 elements as follows.
<strong><i>Word</i></strong>or
<i><strong>Word</strong></i>Do check that you have a first in, last out sequence. The start and end tags should pair up from the centre outwards. The following are wrong. Some browsers may be able to handle this error, and display as you intended. Others can be confused by tags in the wrong order.
<strong><i>Word</strong></i> <i><strong>Word</i></strong>
The display of the 6 headings will be at the headings default settings and will vary from large for h1 to small text for h6. You will soon learn how to change the appearance of these headings using CSS, Cascading Style Sheets.
The 2 terms Tags & Elements are often interchanged
Example
<b>This is bold text</b>
To emphasize important text use the <strong> tag rather than the <b> tag. The actual visual look of the 2 elements is identical in most browsers, but has a difference to search engines.
End Tag Required
Inline Element
<em> Emphasised text </em> results in Emphasised text, usually rendered in italics
End Tag Required
Inline Element
<h1> Main Heading only use one on a page
<h2> to <h6> Subheadings
Example
<h1>Heading 1 example.</h1>
<h2>Heading 2 example.</h2>
<h3>Heading 3 example.</h3>
<h4>Heading 4 example.</h4>
<h5>Heading 5 example.</h5>
<h6>Heading 6 example.</h6>
End Tag Required
Block Element
<i> Italic text </i> results in Italic text
Use the <em> tag rather than the <i> tag
End Tag Required
Inline Element
<mark>This is highlighted text</mark>
End Tag Required
Inline Element
In HTML 4.01, the <strong> tag defines strong emphasized text, but in HTML5 it defines important text. It is usually rendered by browsers in a Bold Font
Example
<strong>This is Important text</strong>
End Tag Required
Inline Element
This site is hosted on Hostgator