You are on page 1of 1

HTML CHEATSHEET

Hyper Text Markup Language


Basic Structure
Basic building block for pages
<html>
HTML contains 2 types of info:
<head>
TAGS / ELEMENTS <title>website title</title>
ATTRIBUTES </head>
Attributes change the tag. <body>
content of website ...
EXAMPLE:
</body>
<body bgcolor="yellow">
</html>

"body" is a tag
"bgcolor" is an attribute

<head> ... </head>


Head contains information for
your browser

<body> ... </body>


Headings The <body> tag contains the
<h1> ... </h1> code (the content) for the site
<h2> ... </h2>
<h3> ... </h3>
<h4> ... </h4>
Lists
There are two types of lists
<h5> ... </h5>
unordered lists <ul> .. </ul>
<h6> ... </h6>
ordered lists <ol> ..</ol>

Text type tags To add bullet points to the list:


<li> ... </li> "li" stands for "list item"
Bold Text <b> ... </b>
Italics Text <i>...</i>
Emphasis Text <em> ... <em>
Strong text <strong> ... </strong>
Paragraph <p> ... </p>
Image <img src= "..." alt ="text">
New line/ Break Line <br>

Closing tags
The closing tag defines the end of
a tag.
Example: <body> ... </body>

DIV Element where <body> is the opening tag,


and </body> is the closing tag.
Divisions are used as containers
to divide the HTML into sections.
<div> ... </div>

Attribute Name and


Values
HTML attributes have names and alues. This can change
the behaviour of an element
<elementName name="value"></elementName >

You might also like