Basic HTML

<!- – Use these tags on the left and right of this text to make comments in your HTML code – ->

<html> <!- – Hyper Text Markup Language … Opening tag (start tag) of document OR web page – ->
</html> <!- – Closing tag (end tag) of document using forward slash and tag you are closing- ->

Copy the text below and save as index.html


<html>
<body>
<h1>My Webpage</h1> Heading sizes normally go from H1 to H6 see below:
<br />A new line
<p>A new paragraph</p>
</body>
</html>


Place the following tags in between your Body Tags to alter your content


Headings
<h1>Heading 1</h1>

Heading 1

<h2>Heading 2</h2>

Heading 2

<h3>Heading 3</h3>

Heading 3

<h4>Heading 4</h4>

Heading 4

<h5>Heading 5</h5>

Heading 5

<h6>Heading 6</h6>

Heading 6

The <hr /> tag creates a horizontal line in a HTML page.


Alter the horizontal line code to create the lines shown below:  NB: size used to change the height but CSS code is now more widely used.
The inline CSS code style=”height: 10px” is used.

<hr width=”10″ style=”height: 10px” />


<hr width=”200″ style=”height: 20px” />

<hr width=”300″ style=”height: 30px” />

<hr width=”500″ style=”height: 5px” />


old code for line break <br></br>
new code for line break <br /> does both start tag and end tag in one command
<br /> works better in XML and XHTML

Special Characters

Symbol Character Code
non-breaking space &nbsp;
< less than &lt;
> greater than &gt;
& ampersand &amp;
£ pound &pound;
euro &euro;
© copyright &copy;
® registered trademark &reg;
trademark &trade;