Tag Cheat Sheet
Firstly, the best practice for making sure that your website has all of the appropriate tags is to use a HTML template to start each time. This way you can be sure that your page is starting with a solid foundation.
Here is a template that you can copy and save:
<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
<meta charset="utf-8">
</head>
<body>
</body>
</html>
Tags are used to define elements in your code and are what allow your webpage to display properly in a browser. Below are the ten most common tags and what they are used for:
<h1> thru <h6> | These tags are headings and they go from <h1> being the largest to <h5> which is the smallest. These can be used as titles among other things. |
<p> | This tag is for paragraphs. |
<i> | This tag shows the text it surrounds in italics, <em> can also be used. |
<b> | This tag shows the text it surrounds as bold, <strong> can also be used. |
<a> | This is the anchor tag. This is used to create links to either an external or internal page, an ftp server, or even an email address. |
<ul> and <li> | The <ul> tag creates an unordered list which displays all of your list elements <li> as bullet points. |
<blockquote> | This tag displays a quote in an indented block but it should only be used for long quotes. |
<hr> | This tag draws a horizontal line across the page, usually used for breaks in content. |
<img> | This tag is used to display an image but must also include src and alt. Src is the source file for the image and alt is a description of the image |
<div> | This tag is a "dummy" tag and it is used to group block elements that can then be formatted using CSS |
While these are the ten most common tags we will be adding more specialized tags and exploring more functionality later on.