Computer Applications Technology/P1 DBE/Feb.–Mar.
2018
NSC
HTML TAG SHEET
Basic Tags Formatting Tags continued
Tag Description Tag Description
<body></body> Defines the body of the web page Inserted before each list item, and
<li></li> adds a number or symbol
<body Sets the background colour of the
depending upon the type of list
bgcolor="pink"> web page
selected
<body text="black"> Sets the colour of the body text <img src="name"> Adds an image
<img src="name" Aligns an image: can be "left",
<head></head> Contains information about the align="left"> "right"; "bottom", "top", "middle"
web page
<p align=
"center"><img Aligns an image to the "center"
<html></html> Creates an HTML document – src="name"></p>
starts and ends a web page
<img src="name" Sets size of the border around an
<title></title> Defines a title for the web page border="1"> image
<br/> Inserts a line break <img src="name"
<!-- --> width="200" Sets the height and width of an
Comment
height ="200"> image
Text Tags
Tag Description <img src="name"
Displays alternative text when the
<hl></hl> Creates the largest heading alt=
"alternative mouse hovers over the image or
text"> when the image is not found
<h6></h6> Creates the smallest heading
<hr/> Inserts a horizontal line
<b></b> Creates bold text <hr size="3"/> Sets size (height) of a line
<hr Sets width of a line, in percentage
<i></i> Creates italic text width="80%"/> or absolute value
<font <hr
size="3"></font> Sets size of font, from "1" to "7" color="ff0000"/> Sets the colour of the line
<font Table Tags
color="green"> Sets font colour
</font> Tag Description
<font face="Times <table></table> Creates a table
New Roman"></font> Sets font type
<tr></tr> Creates a row in a table
Links Tags <td></td> Creates a cell in a table
Tag Description Creates a table header (a cell with
<th></th>
<a href="URL"></a> Creates a hyperlink bold, centred text)
<a href="URL"><img <table
src="name"></a> Creates an image link width="50"> Sets the width of the table
Creates a target location in the <table Sets the width of the border around
<a name="NAME"></a>
document border="1"> the table cells
<table Sets the space between the table
<a Links to a target location created cellspacing="1"> cells
href="#NAME"></a> somewhere else in the document
<table Sets the space between a cell
Formatting Tags cellpadding="1"> border and its contents
Tag Description <tr Sets the alignment for cell(s) ("left",
<p></p> Creates a new paragraph align="left"> can also be "center" or "right")
Aligns a paragraph to the "left" Sets the vertical alignment for
<tr
<p align="left"> (default), can also be "right", or cell(s) ("top", can also be "middle"
valign="top">
"center" or "bottom")
<br/> Inserts a line break Sets the number of columns a cell
<td colspan="2">
<ol></ol> Creates a numbered list should span
<ol type="A","a", Defines the type of numbering Sets the number of rows a cell
<td rowspan="4">
"I","i","1"></ol> used should span
<ul></ul> Creates a bulleted list
<ul type="disc",
"square","circle"> Defines the type of bullets used
</ul>
Copyright reserved