HTML Tags

IMG - src, alt, width, height, border, align

Eg:

Align Left (default)
Alternate Text

<img src="../img/parallax-bg.jpg" alt="Alternate Text" width="200" height="200" border="5">

Align Right
Alternate Text

<img src="../img/parallax-bg.jpg" alt="Alternate Text" width="200" height="200" border="5" align="right">


TABLE - th, tr, td, border, width, height, cellpadding, cellspacing, bgcolor, bordercolor, colspan, rowspan, thead, tbody, tfoot, nested tables

Eg:

th, tr, td, border, width, height, cellpadding, cellspacing, bgcolor, bordercolor

Head 1 Head 2
Col 1 Col 2
<table border="1" bordercolor="red" width="200" height="200" cellpadding="10" cellspacing="0" bgcolor="yellow">
<tr>
<th>Head 1</th>
<th>Head 2</th>
</tr>
<tr>
<td>Col 1</td>
<td>Col 2</td>
</tr>
</table>


colspan

Col 1 Col 2 Col 3
Col 1 Col 2
<table border="1" bordercolor="red" cellpadding="10" cellspacing="0" bgcolor="yellow">
<tr>
<td>Col 1</td>
<td>Col 2</td>
<td>Col 3</td>
</tr>
<tr>
<td>Col 1</td>
<td colspan="2">Col 2</td>
</tr>
</table>


rowspan

Col 1 Col 2 Col 3
Col 4 Col 5
<table border="1" bordercolor="red" cellpadding="10" cellspacing="0" bgcolor="yellow">
<tr>
<td rowspan="2">Col 1</td>
<td>Col 2</td>
<td>Col 3</td>
</tr>
<tr>
<td>Col 4</td>
<td>Col 5</td>
</tr>
</table>


thead, tbody, tfoot

Header
Col 1 Col 2 Col 3
Col 4 Col 5 Col 6
Footer
<table border="1" bgcolor="yellow" cellpadding="10">
<thead align="center">
<tr>
<th colspan="3">Header</th>
</tr>
</thead>
<tbody>
<tr>
<td>Col 1</td>
<td>Col 2</td>
<td>Col 3</td>
</tr>
<tr>
<td>Col 4</td>
<td>Col 5</td>
<td>Col 6</td>
</tr>
</tbody>
<tfoot align="center">
<tr>
<td colspan="3">Footer</td>
</tr>
</tfoot>
</table>


nested tables

Table 1 Col 1

Table 1 Col 2

Table 2 Col 1

Table 2 Col 2

<table border="1" bgcolor="yellow" cellpadding="10">
<tr>
<td valign="top">Table 1 Col 1</td>
<td>Table 1 Col 2
<table border="1" bgcolor="white" cellpadding="10">
<tr>
<td>Table 2 Col 1</td>
<td>Table 2 Col 2</td>
</tr>
</table>
</td>
</tr>
</table>

LISTS

UL - type (square, disc, circle)

Eg:

type - disc (default)

  • List 1
  • List 2
  • List 3
<ul>
<li>List 1</li>
<li>List 2</li>
<li>List 3</li>
</ul>


type - square

  • List 1
  • List 2
  • List 3
<ul type="square">
<li>List 1</li>
<li>List 2</li>
<li>List 3</li>
</ul>


type - circle

  • List 1
  • List 2
  • List 3
<ul type="circle">
<li>List 1</li>
<li>List 2</li>
<li>List 3</li>
</ul>



OL - type (1, I, i, A, a), start (<ol type="i" start="3">)

Eg:

type - 1 (default)

  1. List 1
  2. List 2
  3. List 3
<ol>
<li>List 1</li>
<li>List 2</li>
<li>List 3</li>
</ol>


type - I (roman)

  1. List 1
  2. List 2
  3. List 3
<ol type="I">
<li>List 1</li>
<li>List 2</li>
<li>List 3</li>
</ol>


type - i (roman)

  1. List 1
  2. List 2
  3. List 3
<ol type="i">
<li>List 1</li>
<li>List 2</li>
<li>List 3</li>
</ol>


type - A

  1. List 1
  2. List 2
  3. List 3
<ol type="A">
<li>List 1</li>
<li>List 2</li>
<li>List 3</li>
</ol>


type - a

  1. List 1
  2. List 2
  3. List 3
<ol type="a">
<li>List 1</li>
<li>List 2</li>
<li>List 3</li>
</ol>


type - A, start - {position}

  1. List 1
  2. List 2
  3. List 3
<ol type="A" start="5">
<li>List 1</li>
<li>List 2</li>
<li>List 3</li>
</ol>



DL - Dictionary Type (<DL> <DT>TITLE</DT> <DD>TEXT</DD> </DL>)

Eg:

TITLE
TEXT
<DL>
<DT>TITLE</DT>
<DD>TEXT</DD>
</DL>



A (Anchor)

A - HREF, TARGET (_self, _parent, _blank, _top, named frame)

Eg:

Link Text

<a href="test.html" target="_blank">Link Text</a>


A - Named Anchor

Heading

Keeping scrolling down, till you "Go to Top" link and click on that link

Paragraph

Paragraph

Paragraph

Paragraph

Paragraph

Paragraph

Go to Top - Clicking this link will take you back to the top of the page/container OR specific section where you have declared <a name="<custom name>"></a>

<div style="overflow:auto; border:2px solid #000; width:200px; height:200px;">
<h1><a name="top"></a>Heading</h1>
<p>Keeping scrolling down, till you "Go to Top" link and click on that link</p>
<p>Paragraph</p><p>Paragraph</p><p>Paragraph</p><p>Paragraph</p><p>Paragraph</p><p>Paragraph</p>
<p><a href="#top">Go to Top</a> - Clicking this link will take you back to the top of the page/container OR specific section where you have declared <b><a name="<custom name>"></a></b></p>
</div>

A (Anchor)

Email Link

Eg:

Click to Send Email - clicking the link will open the default Email Program set

<a href="mailto:name@email.com?subject='Test Subject'&body='Text Body Text'">Click to Send Email</a>


IFRAME

iframe - src, name, frameborder, width, height, marginwidth (not supported in HTML5), marginheight (not supported in HTML5), scrolling (yes or no)

Eg:

Without Border, Without Scrolling


<iframe src="https://www.ndtv.com/" width="100%" height="300" scrolling="no" frameborder="0">iframe</a>
With Border


<iframe src="https://www.ndtv.com/" width="100%" height="300" frameborder="1">iframe</a>