0% found this document useful (0 votes)
12 views2 pages

HTML Basics and Formatting Guide

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views2 pages

HTML Basics and Formatting Guide

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd

Gateway Computer Services Local O/L

HTML

Paragraph
<html>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>

Background Colour <html>


</html> <body background="[Link]">
<html> <h1>Hello world!</h1>
<body bgcolor="#E6E6FA"> </body>
<h1>Hello world!</h1> </html>
</body>
</html>
Background Image

HTML Links
HTML links are defined with the <a> tag.
<a href="[Link] is a link</a>
An HTML Link
Link syntax:
<a href="url">Link text</a>

HTML images
HTML images are defined with the <img> tag.
<img src="[Link]" width="104" height="142" />

HTML Comments
Comments can be inserted in the HTML code to make it more readable and understandable.
Comments are ignored by the browser and are not displayed.
Comments are written like this:
<!-- This is a comment -->

Horizontal Rule
<h1>HTML</h1>
<p>HTML is a language for describing web pages.....</p>
<hr>
<h1>CSS</h1>

Font
<font size="3" color="red">This is some text!</font>
<font size="2" color="blue">This is some text!</font>
<font face="verdana" color="green">This is some text!</font>

Text Formatting Tags


 HTML headings are defined with the  <em> emphasized text
<h1> to <h6> tags.  <i> italic text
 <b> bold text  <small> small text
 <big> big text  <strong> strong text

1
Gateway Computer Services Local O/L

 <sub> subscripted text  <sup> superscripted text

Unordered Lists
An unordered list is a list of items. The list items are marked with bullets (typically small black
circles).
An unordered list starts with the <ul> tag. Each list item starts with the <li> tag.
<ul>
<li>Coffee</li>
<li>Milk</li>
</ul>

Here is how it looks in a browser:


 Coffee
 Milk

Ordered Lists
An ordered list is also a list of items. The list items are marked with numbers.
An ordered list starts with the <ol> tag. Each list item starts with the <li> tag.

<ol>
<li>Coffee</li>
<li>Milk</li>
</ol>

Here is how it looks in a browser:


1. Coffee
2. Milk

HTML Tables

<table border="4" >


<tr>
<td>Column 1</td>
<td>Column 2</td>
</tr>
</table>

<table border="2" bordercolor="#336699">


<tr>
<td>Column 1</td>
<td>Column 2</td>
</tr>
</table>

HTML Frames

The <frame> tag defines one particular window (frame) within a <frameset>.Each <frame> in a
<frameset> can have different attributes, such as border, scrolling, the ability to resize, etc.

<frameset cols="25%,50%,25%">
<frame src="frame_a.htm">
<frame src="frame_b.htm">
<frame src="frame_c.htm">
</frameset>

You might also like