<link>

The <link> tag is supported in all major browsers.


Definition and Usage

The <link> tag defines the relationship between a document and an external  resource.
The <link> tag is most used to link to style sheets.


Differences Between HTML 4.01 and HTML5

Some HTML 4.01 attributes are not supported in HTML5.

The "sizes" attribute is new in HTML5.


Tips and Notes

Note: The <link> element is an empty element, it contains attributes only.

Note:  This element goes only in the head section, but it can appear any number of times.


Attributes

New : New in HTML5.

AttributeValueDescription
charset char_encoding Not supported in HTML5
href URL Specifies the location of the linked document
hreflang language_code Specifies the language of the text in the linked document
media media_query Specifies on what device the linked document will be displayed
rel alternate archives author bookmark external first help icon last licence next nofollow noreferrer pingback prefetch prev search sidebar stylesheet tag up Required. Specifies the relationship between the current document and the linked document
rev reversed relationship Not supported in HTML5
sizes    New HeightxWidth any Specifies the size of the linked resource. Only for rel="icon"
target _blank _self _top _parent frame_name Not supported in HTML5
type MIME_type Specifies the MIME type of the linked document

Global Attributes

The <link> tag also supports the Global attributes in HTML5.


Event Attributes

The <link> tag also supports the Global Event Attributes in HTML5.

<li>

The <li> tag is supported in all major browsers.


Definition and Usage

The <li> tag defines a list item.

The <li> tag is used in ordered lists(<ol>),  unordered lists (<ul>), and in  menu lists (<menu>).


Differences Between HTML 4.01 and HTML5

The "type" attribute was deprecated  in HTML 4.01, and is NOT supported in HTML5.

The "value" attribute was deprecated  in HTML 4.01, but IS supported in HTML5.


Tips and Notes

Tip: Use CSS to define the type of list.


Attributes

AttributeValueDescription
value number Specifies the value of a list item. The following list items will increment from that number (only for <ol> lists)

Global Attributes

The <li> tag also supports the Global attributes in HTML5.


Event Attributes

The <li> tag also supports theGlobal Event Attributes in HTML5.

<legend>

The <legend> tag is supported in all major browsers.


Definition and Usage

The <legend> tag defines a caption for the <fieldset>, <figure>, and the <details> elements.


Differences Between HTML 4.01 and HTML5

In HTML 4.01 the <legend> tag only applies to the <fieldset> element.

In HTML5 the <legend> tag applies to: <fieldset>, <figure>, and <details>.

The align attribute is not supported in HTML5. Use CSS instead.


Global Attributes

The <legend> tag also supports the Global attributes in HTML5.


Event Attributes

The <legend> tag also supports the Global Event Attributes in HTML5.

 <label>

The <label> tag is supported in all major browsers.


Definition and Usage

The <label> tag defines a label for an <input> element.

The <label> element does not render as anything special for the user. However, it  provides a usability improvement for mouse users, because if the user clicks on  the text within the <label> element, it toggles the control.

The for attribute of the <label> tag should be equal to the id attribute of the  related element to bind them together.


Differences Between HTML 4.01 and HTML5

The "form" attribute is new in HTML5.


Tips and Notes

Tip: A label can be bound to another element either by using the "for"  attribute, or by placing the element inside the <label> element.


Attributes

New : New in HTML5.

AttributeValueDescription
for element_id Specifies which form element a label is bound to
form    New form_id Specifies one or more forms the label belongs to

Global Attributes

The <label> tag also supports theGlobal attributes in HTML5.


Event Attributes

The <label> tag also supports the Global Event Attributes in HTML5.

<kbd>

See <code>

The <em>, <strong>, <dfn>, <code>, <samp>, <kbd>, and <var> tags are all phrase tags. They are not deprecated, but it is possible to achieve richer effect with CSS.

 <keygen>

The <keygen> tag is supported in all major browsers, except Internet  Explorer.

Note: Safari supports the <keygen> element on Mac only.


Definition and Usage

The <keygen> tag specifies a key-pair generator field used for forms.

When the form is submitted, the private key is stored locally, and the public  key is sent to the server.


Differences Between HTML 4.01 and HTML5

The <keygen> element is new in HTML5.


Attributes

New : New in HTML5.

AttributeValueDescription
autofocus     New autofocus Specifies that a <keygen> element should automatically get focus when the page loads
challengeNew challenge Specifies that the value of the <keygen> element should be challenged when submitted
disabled     New disabled Specifies that a <keygen> element should be disabled
form  New form_id Specifies one or more forms the <keygen> element belongs to
keytype  New rsa dsa ec Specifies the security algorithm of the key
name    New name Defines a name for the <keygen> element

Global Attributes

The <keygen> tag also supports the Global attributes in HTML5


Event Attributes

The <keygen> tag also supports the Global Event Attributes in HTML5.

<ins>

The <ins> tag is supported in all major browsers.


Definition and Usage

The <ins> tag defines a text that has been inserted into a document.

Tip: Also look at the <del> tag to markup  deleted text.

Browsers will normally strike a line through deleted text and underline  inserted text.


Differences Between HTML 4.01 and HTML5

NONE


Tips and Notes

Tip: Use <ins> together with <del> to markup updates and modifications  in a document.


Attributes

AttributeValueDescription
cite URL Specifies a URL to a document that explains the reason why the text was  inserted/changed
datetime YYYY-MM-DDThh:mm:ssTZD Specifies the date and time of when the text was inserted/changed

Global Attributes

The <ins> tag also supports the Global attributes in HTML5.


Event Attributes

The <ins> tag also supports the Global Event Attributes in HTML5.

<input>

The <input> tag is supported in all major browsers.


Definition and Usage

The <input> tag specifies an input field where the user can enter data.

<input> elements are used within a <form> element to declare input  controls that allow users to input data.

An input field can vary in many ways, depending on the type attribute.


Differences Between HTML 4.01 and HTML5

In HTML 4.01, the "align" attribute was deprecated, and is not supported in HTML5.  Use CSS to align <input> elements.

In HTML5, the <input> tag has many new attributes, and the type attribute  has many new values.


Tips and Notes

Note: The <input> element is empty, it contains attributes only.

Tip: Use the <label> element to define labels  for <input> elements.


Attributes

New : New in HTML5.

 
AttributeValueDescription
accept audio/* video/* image/* MIME_type Specifies the types of files that the server accepts (only for type="file")
alt text Specifies an alternate text for images (only for type="image")
autocomplete   New on off Specifies whether an <input> element should have autocomplete enabled
autofocus  New autofocus Specifies that an <input> element should automatically get focus when the page loads
checked checked Specifies that an <input> element should be pre-selected when the page loads (for type="checkbox" or type="radio")
disabled disabled Specifies that an <input> element should be disabled
form  New form_id Specifies one or more forms the <input> element belongs to
formaction   New URL Specifies the URL of the file that will process the input control when the form is submitted (for type="submit" and type="image")
formenctype   New application/x-www-form-urlencoded multipart/form-data text/plain Specifies how the form-data should be encoded when submitting it to the server (for type="submit" and type="image")
formmethod    New get post Defines the HTTP method for sending data to the action URL (for type="submit" and type="image")
formnovalidate   New formnovalidate Defines that form elements should not be validated when submitted
formtarget    New _blank _self _parent _top framename Specifies where to display the response that is received after submitting the form (for type="submit" and type="image")
height    New pixels Specifies the height of an <input> element (only for type="image")
list   New datalist_id Refers to a <datalist> element that contains pre-defined options for an <input> element
max    New number date Specifies the maximum value for an <input> element
maxlength number Specifies the maximum number of characters allowed in an <input> element
min    Newnumber date Specifies a minimum value for an <input> element
multiple    New multiple Specifies that a user can enter more than one value in an <input> element
name text Specifies the name of an <input> element
pattern    New regexp Specifies a regular expression that an <input> element's value is checked against
placeholder    New text Specifies a short hint that describes the expected value of an <input> element
readonly readonly Specifies that an input field is read-only
required    New required Specifies that an input field must be filled out before submitting the form
size number Specifies the width, in characters, of an <input> element
src URL Specifies the URL of the image to use as a submit button (only for     type="image")
step    New number Specifies the legal number intervals for an input field
type button       checkbox color       date datetime datetime-local email       file       hidden       image       month number       password       radio       range       reset search       submit tel       text time url week Specifies the type <input> element to display
value text Specifies the value of an <input> element
width   New pixels Specifies the width of an <input> element (only for type="image")

Global Attributes

The <input> tag also supports theGlobal attributes in HTML5.


Event Attributes

The <input> tag also supports the Global Event Attributes in HTML5.

<img>

The <img> tag is supported in all major browsers.


Definition and Usage

The <img> tag defines an image in an HTML page.

The <img> tag has two required attributes: src and alt.

Note: Images are not technically inserted into an HTML page, images are  linked to HTML pages. The <img> tag creates a holding space for the referenced  image.

Tip: To link an image to another document, simply nest the <img> tag  inside <a> tags.


Differences Between HTML 4.01 and HTML5

The layout attributes: align, border, hspace, and vspace were deprecated  in HTML 4.01, and are not supported in HTML5.


Attributes

AttributeValueDescription
src URL Required. Specifies the URL of an image
alt text Required. Specifies an alternate text for an image
height pixels Specifies the height of an image
ismap ismap Specifies an image as a server-side image-map
usemap #mapname Specifies an image as a client-side image-map
width pixels Specifies the width of an image

Global Attributes

The <img> tag also supports the Global attributes in HTML5.


Event Attributes

The <img> tag also supports the Global Event Attributes in HTML5.

<iframe>

The <iframe> tag is supported in all major browsers.


Definition and Usage

The <iframe> tag specifies an inline frame.

An inline frame is used to embed another document within the current HTML  document.


Differences Between HTML 4.01 and HTML5

HTML5 has some new attributes, and some HTML 4.01 attributes are not  supported in HTML5.


Tips and Notes

Tip: Use CSS to style the <iframe> (even to include scrollbars).


Attributes

New : New in HTML5.

AttributeValueDescription
frameborder 1 0 Not supported in HTML5
height pixels Specifies the height of an iframe
longdesc URL Not supported in HTML5
marginheight pixels Not supported in HTML5
marginwidth pixels Not supported in HTML5
name name Specifies the name of an iframe
sandbox    New ""       allow-forms       allow-same-origin       allow-scripts       allow-top-navigation      Enables a set of extra restrictions for the content in the iframe
scrolling yes no auto Not supported in HTML5
seamless    New seamless Specifies that the iframe should look like it is a part  of the containing document
src URL Specifies the address of the document to embed in the iframe
srcdoc   New HTML_code Specifies the HTML content of the page to show in the iframe
width pixels Specifies the width of an iframe

Global Attributes

The <iframe> tag also supports the Global attributes in HTML5.


Event Attributes

The <iframe> tag also supports the Global Event Attributes in HTML5.