HTML Cheat Sheet | Become A Pro Free Download – GoogleDriveLinks.com

HTML stands for Hyper Text Mark-up Language
Used for: creating web pages 8 (documents) that are displayed on the World Wide Web (websites). The pages can be a mix of text, images, videos, and other elements. It can be created with: notepad, TextPad or any text editors.
Saved as: .html files
HTML Cheat Sheet
Here we are sharing with you the complete HTML Cheat Sheet:
Basic structure
body tags and main content
The main elements in HTML are the tags. Tags structure and present the data in different forms.
Heading
<h1>Heading 1</h1> <h2>Heading 2 </h2> <h3>Heading 3</h3> <h4>Heading 4</h4> <h5>Heading 5</h5> <h6>Heading 6 </h6>
Paragraph
<p>write a paragraph</p> Attribute βstyleβ can be used with <p> to display the text inside <p> in a specific manner. For example, <p style = "color:blue">I will appear blue</p> <p style = "background-color:blue">Highlighting as blue</p> <br> line break
Span
Span tag is used for styling inline elements.
<span style = βcolor:greenβ> Address </span>
- prints the word βAddressβ in the specified color (here green). The style attribute is used to style HTML elements.
Characters
"
– add quotation mark (β)<
– less than symbol (<)>
– greater than symbol (>)&
– the β&β or ampersand symbol©
– copyright symbol™
– trademark symbol
Formatting
<b>Bold text </b>
<i>*Italic text*</i>
<u>*underlined text*</u>
<mark>I am highlighted in yellow</mark>- marks the text in yellow. If other colors are needed, span is used.
<span style="background-color: #FF00FF">I am highlighted in pink</span>
<strong>I am strong</strong> - give emphasis to a particular text; mostly bold
<font></font> - chosen font for the text
Font is not used in HTML 5, CSS is used. Attributes of <font> -
<face> - the font family, for example Courier New
<size> - size of the text
<color> - color of the text in hex value (eg. #FF000F) or text (eg.red)
<small></small> - smaller text, fine print size
<strike>Strike that out</strike> - strikeout the text inside the tag
<sup></sup> - superscript (text above the normal text like exponential numbers)
<sub></sub> - subscript
<em></em> - emphasis
<pre></pre> - preformatted text
<tt></tt> - typewriter text
Body
<body>
– the main content lies in the body. Inside there can be many sections. Attributes β
- background=ββ – Background Image source; can be left empty if no image
- bgcolor=ββ – Background Colour in hex value
- text=ββ – page text color
- link=ββ – Link Colour
- alink=ββ – Active (current) Link Colour
- vlink=ββ – Visited Link Colour
- bgproperties=ββ – Background Properties. A value of βfixedβ means non-scrolling watermark
- topmargin=β?β – Top Margin Size in Pixels
- leftmargin=ββ – Side Margin Size in Pixels
Metadata
<meta>
tag is a part of and describes information about data. Most common use of metadata is by search engines for keywords. – most common character set Attributes β
- name = ββ β can be name like keyword, author, description etcβ¦
- content = ββ β the value corresponding to above names
Example – <meta name="keywords" content="What is HTML, How to learn HTML">
Sections and divisions
<div></div> new section; nested div tags are very common when multiple sub-sections are required
<hr> - horizontal line
<hr> has the following attributes β
<hr size = ββ width = ββ/width = β%β color = ββ align = βleft/center/rightβ> size β thickness of the line in pixels width β in pixels or percentage (any one) color β color in hex value align β alignment; left, right or center
Tables
<table> <tr> <td></td> <td></td> <td></td> </tr> <tr> <td></td> <td></td> <td></td> </tr> </table>
<table> - creates a table, <tr> - creates a row, <td> - creates column, <th> - creates header columns
<table>
attributes β
- border=ββ – Thickness of outside border in pixels
- bordercolor=ββ – Border Colour in hex value
- cellspacing=ββ – Space between each cell in pixels
- cellpadding=ββ – Space between cell border and content
- align=ββ – Horizontal Alignment; left, right, center
- bgcolor=ββ – Background Colour hex value
- width=ββ – Table Width in pixels or %
- height=ββ – Table Height in pixels or %
<td>
attributes
- colspan=ββ – Number of columns the cell spans across
- rowspan=ββ – Number of rows cell spans across
- width=ββ – width of cell in pixels or %
- height=ββ – height of cell in pixels or %
- bgcolor=ββ β hex value of background colour for the cell (column)
- align=ββ – Horizontal Align; left, center, right
- valign=ββ – Vertical Align; top, middle, bottom
- – is used to define attributes for particular columns of the table.
Example β
<colgroup> <col span="1" style="background-color:green"> <col style="background-color:blue"> </colgroup>
The first column will be highlighted as green, whereas other columns will be highlighted as blue.
Forms (HTML Cheat Sheet)
Most of the dynamic content like user inputs, submitting a page, filling a form happen inside this tag. It is a group of related inputs.
<form> <input> <select><option></option></select> <textarea> </form>
<form>
tag attributes β
- action=βurlβ – destination url upon form submission
- method=ββ – form method – get, post
- enctype=ββ – type of encoding; for file upload it is βmultipart/form-dataβ
<input>
tag attributes β
- type=ββ – Mandatory input Field Type: text, password, checkbox, submit and so on.
- name=ββ – Form Field Name (mandatory for form processing)
- value=ββ – value (entered by user) or default value
- size=ββ – field size
- maxlength=ββ – Maximum acceptable length of Input Field data
- checked – Mark selected field in checkbox (multi-select) or radio button (single-select)
<select> </select>
– Select options from drop-down list <select>
tag Attributes:
- name=ββ – Drop Down Combo-Box Name; mandatory for form processing
- size=ββ – size of the drop-down list
- multiple – Allow multiple selections
<option></option>
– individual items of the drop-down list <option>
tag Attributes:
- value=ββ – Option value selected or default value set
<textarea>
lot of text like description – Large area for text inputs
<textarea>
Tag Attributes:
- name=ββ – Text area name for form processing
- rows=ββ – Number of rows of text shown
- cols=ββ – Number of columns (characters per row)
- wrap=ββ – text wrapping
iframe
<iframe src=ββ></iframe>
– embed another document within the current document (page) in a frame.- Attribute βsrcβ β location of the document to be embedded
Links
HTML links, also called as hyperlinks are defined by βaβ tag β Attributes β
- href = ββ β the url to be visited when the link is clicked
- target = ββ β specifies where to open the link – _blank (new tab/window), _self (same window/tab), _parent (in the parent frame), framename β open in a particular frame.
- title = ββ β gives information about the element
- id = ββ β to create bookmarks in the page that can be used as value in href attribute.
Examples β
<a href = "https://onehack.us/">Go to onehack.us</a>
<a href = "C:\Users\Public">Open a resource from the given location</a>
<a href = "#divprop">Reach a div element specified by the name</a>
Build Responsive Real World Websites with HTML5 and CSS3 12
Styles
For styling, there are many attributes being used with various tags. The attributes are β
<style> text-align= ββ β align text; left, right, center background-color = ββ β background color of the element color=ββ β for color of texts font-family = ββ β for various fonts font-size = ββ size of the font border = ββ β border thickness and color for a table </style>
These styling elements are put together in a CSS.
Lists
There are two types of lists β ordered and unordered.
– ordered list Attributes β
type=ββ β the numbering of the list β A, a, I, 1, i
start = ββ β starting value
<ul></ul> - unordered list
Attributes β
type = ββ β type of bullet β square, circle, disc
<li></li> - individual value in the list
Attributes β
<value> = ββ β value of list item
<type>=ββ β type of the list item
Images
– shows the image when page loads Attributes β
- src =βsourceofimageβ β source of the image; url or file location; mandatory
- alt = βalternate textβ β alternate text; mandatory
- align = βleft/right/centerβ β alignment with respect to surrounding items (text)
- width = ββ β in pixels or percentage
- height = ββ – in pixels or percentage
- border = ββ β thickness of the border in pixels
- hspace = ββ β space in pixels on the sides of the image
- vspace = ββ β space in pixels on top and bottom of the image
HTML5 Tags
