Basics HTML Tags cheat sheet-[50+ cheat sheets]

Basic HTML Tags: These Basic HTML tags consists of the most commonly used HTML tags and syntax. HTML codes or tags create tables, texts, Forms, links, frames, Frame attributes, and so on in an HTML version document. This cheat sheet will help you to know more about those tags, read the below article to get to know about Basic HTML tags.

HTML Logo
HTML Logo

Basic HTML Tags

Basic Tags Description
<html></html> This tag creates an HTML document.
<head><head> Tag is for the title and other information that is not displayed on the web page itself.
<body><body> This tag is for the Visible portion of the document.

Tags for Body Attributes

Tags Description
<body bgcolor=”pink”> The tag creates the background color, using the name or hex value.
<body text=”black”> This tag is for the text color, using the name or hex value.
<body link=”blue”> The tag sets the color of the link using a name or hex value.
<body vlink=”#ff0000″> This tag sets the color for the followed links, using the name or hex value.
<body alink=”#00ff00″> It sets the color of links on click.
<body ondragstart-“return false”onselectstart=”return false”> This Tag does not allow text selection using mouse and keyboard.

Tags for Tables

Tags Used to
<table></table> This tag creates a tag in the HTML document.
<tr></tr> Tag to generate a row in a table in the HTML document.
<td></td> Tag to generate a column or cell in a row.
<th></th> This tag creates the table header that appears in the bold centered text.

Basic Tags for Table attributes

Tags Used to
<table border=”1″> Used to create the width of the border around table cells.
<table cellspacing=”1″> This tag sets the amount of space between the table cells.
<table cellpadding=”1′> Tag is to set the amount of space between a cell’s border and its contents.
<table width=”500″or”80%”> Tag to create the width of the table in pixels or as a percentage of document width.
<tr align=”left”> or <td align=”left”> This tag forms alignment for cells left, right or center.
<tr valign=”top”> or <td valign=”top”> Tag forms a vertical alignment for cells top, middle, or bottom.
<td colspan=”2″> This tag forms a number of columns a cell can extend.
<td rowspan=”4″> Tag to set a number of rows a cell can extend.
<td nowrap> This tag prevents the lines within a cell from being broken to fit.

HTML Tags for Texts

Text Tags Used to
<pre></pre> This tag creates a preformatted text.
<hl></hl> Tag forms the largest headline.
<h6></h6> This tag creates the smallest headline.
<b></b> Tag creates a bold text.
<i></i> This tag indicates the italic text.
<tt></tt> Tag forms a teletype or typewriter style text.
<cite></cite> Tag forms a citation that usually shows up in italic.
<em></em> This tag emphasizes the word with italics or bold.
<strong></strong> Tag emphasizes a word in italic or bold.
<font size=”3″></font> This tag creates a set size of font from 1 to 7.
<font color=”green”></font> The tag sets the font color, using a name or hex value.

HTML Form Tags

Tags Description
<form></form> Tag creates all forms.
<select multiple name=”NAME”size=/></select> This tag forms a scrolling menu. Size sets the number of menu items visible before you need to scroll.
<option> This tag forms each menu item.
<select name=”NAME”></select> Tag creates a pull down menu.
<textarea name=”NAME” cols=40 rows=8></textarea name> This tag forms a text box area. Columns set the width and rows set the height.
<input type=”checkbox”name=”NAME”> Forms a checkbox, text follows tag.
<input type=”radio” name=”NAME” value=”x”> Tag forms a radio button, text follows tag.
<input type=”text” name=”NAME” SIZE=20> This tag forms a one-line text area, size sets length in characters.
<input type=”submit” value=”NAME”> This tag creates a submit button.
<button type=”submit”>submit</button> Forms an actual button that is clicked.
<input type=”image” border=0 name=”NAME”src=”name.gif”> This tag creates a submit button with an image.
<input type=”reset”> Tag creates a reset button.

Tags for Links

Tags Used to
<a href=”URL”></a> This tag creates a Hyperlink.
<a href=”mailto:EMAIL”></a> Tag creates a mail to link.
<a href=”URL”><img src=”URL”></a> This tag creates an image / link.
< a name=”NAME”></a> Tag creates a target location within a document.
< a href=”NAME”></a> Creates a link to that target location from elsewhere in the document.

Tags for Frames

Tags Description
<frameset></frameset> This tag replaces the <body> tag in a frames document can also be nested in other frame sets.
<frameset rows=”value, value”> This tag defines the rows within the frameset, using numbers in pixels or percentages of width.
<frameset cols=”value, value”> The tag defines the columns with frameset, using the number of pixels or percentage of the width.
<frame> The tag defines a single frame, or region within a frameset.
<noframes></noframes> This tag defines what will appear on browsers that don’t support frames.

Tags for Frame attributes

Tags Usage
<frame src=”URL”> This tag determines which HTML document should be displayed.
<frame name=”name”> To name the frame or region, so it may be targeted by the other frame.
<frame margin width=”value”> This tag defines the left and right margins for the frame must be equal to or greater than 1.
<frame margin height=”value”> Tag determines the top and bottom margins for the frame must be equal or greater than 1.
<frame scrolling=”value”> This tag sets whether the frame has a scrollbar value that may equal “yes”, or “no”, or “auto”. The default as in the original document is auto.
<frame noresize=”noresize”> This tag prevents the user from resizing a frame.

Formatting HTML tags

Tags Description
<p></p> This tag creates a new paragraph.
<p align=”left”> To align a paragraph to the left, right, or center.
<br> This tag inserts a line break.
<blockquote></blockquote> Tag indents the text from both sides.
<dl></dl> This tag creates a definition list.
<dt> Tag comes before each definition term.
<dd> Comes before each definition.
<ol></ol> Tag creates a numbered list.
<ul></ul> Forms a bulleted list.
<li></li> This tag comes before each list item and adds a number or symbol depending upon the type of list selected.
<div align=”left”> This tag is a generic tag used to format large blocks of HTML also used for stylesheets.
<img src=”name”> Tag adds an image.
<img src=”name”align=”left”> This tag aligns images left, right, center, bottom, top, and middle.
<img src=”name”border=”1″> This tag sets the size for the border around an image.
<img src=”name”align=”left”> Tag aligns images left, right, center, bottom, top, and middle.
<hr /> Tag inserts a horizontal line.
<hr size=”3″/> This tag sets the height of the rule.
<hr width=”80%”/> Tag aligns the width of the rule in percentage or absolute value.
<hr noshade/> This tag forms a rule without a shadow.

Leave a Comment