0% found this document useful (0 votes)
10 views1 page

HTML Cheatsheet

HTML is used to structure and layout web pages. It uses tags like <html>, <head>, and <body> to define overall page structure. The <head> contains metadata and the <body> holds visible page content. Common tags in the <body> include headings (<h1>-<h6>), paragraphs (<p>), lists (<ul> and <ol>), images (<img>), and divisions (<div>) to group content. Attributes modify tags, like "bgcolor" to set a page's background color. Closing tags like </body> denote the end of an opening tag element.

Uploaded by

Wisecrack 34
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views1 page

HTML Cheatsheet

HTML is used to structure and layout web pages. It uses tags like <html>, <head>, and <body> to define overall page structure. The <head> contains metadata and the <body> holds visible page content. Common tags in the <body> include headings (<h1>-<h6>), paragraphs (<p>), lists (<ul> and <ol>), images (<img>), and divisions (<div>) to group content. Attributes modify tags, like "bgcolor" to set a page's background color. Closing tags like </body> denote the end of an opening tag element.

Uploaded by

Wisecrack 34
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 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