HTML Cheat Sheet: Opening Tag Closing Tag Description
HTML Cheat Sheet: Opening Tag Closing Tag Description
Opening Tag
<!DOCTYPE>
<a href="mailto:insertemailaddress">
<a href="website URL here">
<body>
<br>
<div>
<em>
<p style=color:"color";>
Closing Tag
Not needed
</a>
</a>
</body>
Not needed
</div>
</em>
</p>
<footer>
<h1> to <h6>
<head>
<html>
<img src="insert file name">
<li>
<ol>
<p>
<p style="text-align: center;">
</footer>
</h1> to </h6>
</head>
</html>
Not needed
</li>
</ol>
</p>
</p>
Description
Defines the document type
Adds a link to an email address
Adds a link to a website
Defines the body content
Inserts a single line break
Defines a section in a document
Italicizes (emphasizes) text
Adds defined color (replace color with actual color;
example: <p style=color:blue;>)
Defines the footer
Uses header style 1 to header style 6
Defines information about the document
Defines an html document
Inserts an image from source
Creates a list
Creates an ordered list (alphabetical or numerical order)
Defines a paragraph
Aligns text to center
</p>
</p>
</p>
<strong>
<style>
<table>
<td>
<th>
<title>
<tr>
<ul>
</strong>
</style>
</table>
</td>
</th>
</title>
</tr>
</ul>
Bolds text
Creates a style
Inserts a table
Adds a cell in a table row
Adds a table header
Displays the title of the document in the browsers title bar
Adds a row in a table
Creates an unordered (bulleted) list
Here are some important notes and example to help you write HTML code:
1. When the examples above use "<p style=", that can be replaced with the following
<li style=
<h1 style=
<table style=
<td style=
<tr style=
<th style=
<ul style=
The closing tag will be the same as the one you opened with, but you will add a "/" after "<".
Example:
If you opened the tag with
<li style=color:blue;>
You will close it with
</li>
2. When adding images and links, you want text to display properly.
Email Example: <a href=mailto:[email protected]>Jane Does Email</a>
Image Example: <img src="picture.jpg">
Link Example: <a href="http://www.anywebsite.com">Hyperlink to website called Anywebsite.com</a>