0% found this document useful (0 votes)
100 views3 pages

HTML Cheatsheet Cheat Sheet: by Via

This HTML cheat sheet provides a concise reference to common HTML tags for basic page structure like <html> and <body>, text formatting tags such as <b> and <i>, links and colors, tables and their attributes, and form elements including <select>, <textarea>, and <input>. It includes brief descriptions and examples of how to use each tag to lay out and style web page content.

Uploaded by

toosss
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)
100 views3 pages

HTML Cheatsheet Cheat Sheet: by Via

This HTML cheat sheet provides a concise reference to common HTML tags for basic page structure like <html> and <body>, text formatting tags such as <b> and <i>, links and colors, tables and their attributes, and form elements including <select>, <textarea>, and <input>. It includes brief descriptions and examples of how to use each tag to lay out and style web page content.

Uploaded by

toosss
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/ 3

HTML Cheatsheet Cheat Sheet

by kesavanbr via cheatography.com/25369/cs/6744/

Basic Tags Tables Table Attributes (cont) Text Tags (cont)

<ht​m Creates an HTML <ta​bl Creates a table <tr Sets vertical <em​></​em> Emphasizes a word
l>​</h​ document e​> valign​="to​p" alignment for cell(s) (with italic or bold)
tml> </​tab​l > or <td (top, middle, or
<st​ron​g> Emphasizes a word
e> valign​="to​p" bottom)
<he​a Sets off the title and other <​/st​ron​g> (with italic or bold)
>
d>​</ inform​ation that isn’t <tr​> Sets off each row in a
<font Sets size of font,
h​ead displayed on the web page </​tr> table <td Sets number of
size="3​"​> from 1 to 7
> itself colspa​n="2​" columns a cell
<td​> Sets off each cell in a row </​fon​t>
> should span
<bo​d Sets off the visible portion </​td>
<font Sets font color,
(defau​lt=1)
y>​</ of the document
<th​> Sets off the table header color=​"​gre​en" using name or hex
b​ody <td Sets number of
</​th> (a normal cell with bold, >​</f​ont> value
> centered text) rowspa​n="4​" rows a cell should
> span (defau​lt=1)
Forms
Body Attributes <td nowrap> Prevents the lines
Table Attributes
<fo​rm>​</f​or Creates all forms
within a cell from
<body Sets the <table Sets width of border m>
being broken to fit
bgcolo​r="p​ink​"> background
border​="1" around table cells <select Creates a scrolling
color, using
> multiple menu. Size sets the
name or hex Text Tags
<table Sets amount of space name="N​A number of menu
value <pr​e> Creates prefor​matted
cellsp​aci​n between table cells ME​" items visible before
<body Sets the text g=​"​1"> <​/pr​e> text size=?​> you need to scroll.
text="b​lac​k"> color, using <hl​> Creates the largest </​sel​ect>
<table Sets amount of space
name or hex
cellpa​ddi​n between a cell’s </​hl> headline <op​tio​n> Sets off each menu
value
g=​"​1"> border and its <h6​> Creates the smallest item
<body Sets the color
contents </​h6> headline <select Creates a pulldown
link="b​lue​"> of links, using
<table Sets width of table, in <b>​</b Creates bold text name="N​A menu
name or hex
width=​"​50 pixels or as a > ME​"​>
value
0​" or percentage of </​sel​ect>
<i>​</i> Creates italic text
<body Sets the color
"​80%​"> document width <op​tio​n> Sets off each menu
vlink=​"​#ff​000​0"> of followed <tt​> Creates teletype, or
<tr Sets alignment for item
links, using </​tt> typewr​ite​r-style text
align=​"​lef​t" cell(s) (left, center, or <te​xtarea Creates a text box
name or hex <ci​te>​< Creates a citation,
> or <td right) name="N​A area. Columns set
value /c​ite> usually italic
align=​"​lef​t"
ME​" the width; rows set
<body Sets the color
>
cols=40 the height.
alink=​"​#00​ff0​0"> of links on click
rows=8​>
<body Disallows text </​tex​tarea
ondrag​sta​rt=​"​retu selection with name>
rn false" the mouse and
<input Creates a checkbox.
onsele​cts​tar​t="r​et keyboard
type="c​hec​k Text follows tag
urn false">
bo​x"
name="N​A
ME​">

By kesavanbr Published 24th January, 2016. Sponsored by ApolloPad.com


cheatography.com/kesavanbr/ Last updated 24th January, 2016. Everyone has a novel in them. Finish Yours!
Page 1 of 3. https://apollopad.com
HTML Cheatsheet Cheat Sheet
by kesavanbr via cheatography.com/25369/cs/6744/

Forms (cont) Frames Frames Attributes Formatting

<input Creates a radio <fr​ame​‐ Replaces the <bo​dy> <frame Specifies which HTML <p>​</p Creates a new
type="r​adi​o" button. Text set​> tag in a frames src="UR​ document should be > paragraph
name="N​AME​" follows tag </​fra​me document; can also be L"> displayed
<p Aligns a paragraph to the
value=​"​x"> s​et> nested in other
<frame Names the frame, or align=​"​l left (default), right, or
framesets
<input Creates a one- name="n​ region, so it may be ef​t"> center.
type="t​ext​" line text area. <fr​ame Defines the rows within ame​"> targeted by other <br> Inserts a line break
name="N​AME​" Size sets set a frameset, using frames
<bl​ock​q Indents text from both
size=2​0> length, in rows=" number in pixels, or
<frame Defines the left and
uo​te>​</ sides
charac​ters. v​alu​e,v​a percentage of width
margin​wi right margins for the
b​loc​kqu​
lu​e">
<input Creates a d​th=​"​val​u frame; must be equal
ote>
type="s​ubm​it" Submit button <fr​ame Defines the columns e"> to or greater than 1
<dl​> Creates a definition list
value=​"​NAM​E"> set within a frameset, using <frame Defines the top and
</​dl>
<button Creates an cols="v​ number in pixels, or margin​he bottom margins for the
alu​e,v​al‐ percentage of width <dt> Precedes each definition
type="s​ubm​it">​S actual button i​ght​="va​l frame; must be equal
u​e"> term
ub​mit​</b​utt​on> that is clicked ue​"> to or greater than 1
<fr​ame Defines a single frame <dd> Precedes each definition
<input Creates a <frame Sets whether the frame
type="i​mag​e" Submit button > — or region — within a scroll​ing​‐ has a scrollbar; value <ol​> Creates a numbered list
border=0 using an image frameset ="va​lue​" may equal “yes,” “no,” </​ol>
name="N​AME​" <no​fra​‐ Defines what will appear > or “auto.” The default, <ul​> Creates a bulleted list
src="na​me.g​if​"> mes​> on browsers that don’t as in ordinary </​ul>
<input Creates a </​nof​ra support frames documents, is auto
<li​> Precedes each list item,
type="r​ese​t"> Reset button m​es> <frame Prevents the user from </​li> and adds a number or
noresi​ze resizing a frame symbol depending upon
Links =​"​nor​esi​‐ the type of list selected
ze">
<a Creates a hyperlink <div A generic tag used to
href="U​RL" align=​"​l format large blocks of
>​</a> ef​t"> HTML, also used for
styles​heets
<a Creates a mailto
href="m​ail​to:​ link <img Adds an image
EMA​IL">​</a‐ src="na​
> me">

<a Creates an
href="U​RL" image/link
>​<img
src="UR​L">
</a>

<a Creates a target


name="N​A location within a
ME​"​></​a> document

<a Links to that target


href="#​NAM​ location from
E"><​/a> elsewhere in the
document

By kesavanbr Published 24th January, 2016. Sponsored by ApolloPad.com


cheatography.com/kesavanbr/ Last updated 24th January, 2016. Everyone has a novel in them. Finish Yours!
Page 2 of 3. https://apollopad.com
HTML Cheatsheet Cheat Sheet
by kesavanbr via cheatography.com/25369/cs/6744/

Formatting (cont)

<img src="na​me" Aligns an image: left, right, center;


align=​"​lef​t"> bottom, top, middle

<img src="na​me" Sets size of border around an image


border​="1">

<hr /> Inserts a horizontal rule

<hr size="3​" /> Sets size (height) of rule

<hr width=​"​80%​" /> Sets width of rule, in percentage or


absolute value

<hr noshade /> Creates a rule without a shadow

By kesavanbr Published 24th January, 2016. Sponsored by ApolloPad.com


cheatography.com/kesavanbr/ Last updated 24th January, 2016. Everyone has a novel in them. Finish Yours!
Page 3 of 3. https://apollopad.com

You might also like