w3 specification
TRANSCRIPT
-
8/8/2019 w3 Specification
1/41
W3C STANDARDS MAINTAINING BY JKTECHNOSOFT
What are the W3C and web standards?
W3C stands for World Wide Web consortium and the W3C was formed in October 1994by Tim Berners-lee the inventor of the World Wide Web. The W3C oversees internetdevelopment and tries to bring standards and best practices when designing for theinternet.
They govern standards for many things includingHTML,CSS and XML.
HTML SPECIFICATION:
HTML Attributes:
Standard Attributes
Core Attributes
Not valid in base, head, html, meta, param, script, style, and title elements.
Attribute Value Description
class classname Specifies a classname for an element
id id Specifies a unique id for an element
style style_definition Specifies an inline style for an element
title text Specifies extra information about an element
Language Attributes
Not valid in base, br, frame, frameset, hr, iframe, param, and script elements.
Attribute Value Description
Dirltrrtl
Specifies the text direction for the content in anelement
Lang language_codeSpecifies a language code for the content in anelement. Language code reference
xml:lang language_codeSpecifies a language code for the content in anelement, in XHTML documents. Language codereference
http://www.moovinonup.com/tim_berners_lee.htmlhttp://www.moovinonup.com/seo-glossary-h.htmlhttp://www.moovinonup.com/seo-glossary-h.htmlhttp://www.moovinonup.com/seo-glossary-c.htmlhttp://www.moovinonup.com/seo-glossary-c.htmlhttp://www.w3schools.com/tags/att_standard_class.asphttp://www.w3schools.com/tags/att_standard_id.asphttp://www.w3schools.com/tags/att_standard_style.asphttp://www.w3schools.com/tags/att_standard_title.asphttp://www.w3schools.com/tags/ref_language_codes.asphttp://www.w3schools.com/tags/ref_language_codes.asphttp://www.w3schools.com/tags/ref_language_codes.asphttp://www.moovinonup.com/tim_berners_lee.htmlhttp://www.moovinonup.com/seo-glossary-h.htmlhttp://www.moovinonup.com/seo-glossary-c.htmlhttp://www.w3schools.com/tags/att_standard_class.asphttp://www.w3schools.com/tags/att_standard_id.asphttp://www.w3schools.com/tags/att_standard_style.asphttp://www.w3schools.com/tags/att_standard_title.asphttp://www.w3schools.com/tags/ref_language_codes.asphttp://www.w3schools.com/tags/ref_language_codes.asphttp://www.w3schools.com/tags/ref_language_codes.asp -
8/8/2019 w3 Specification
2/41
Keyboard Attributes
Attribute Value Description
Accesskey character Specifies a keyboard shortcut to access an element
tabindex number Specifies the tab order of an element
Standard Event Attributes
HTML 4 added the ability to let events trigger actions in a browser, like starting aJavaScript when a user clicks on an element.
To learn more about programming events, please visit ourJavaScript tutorial and ourDHTML tutorial.
Below is the standard event attributes that can be inserted into HTML / XHTMLelements to define event actions.
and Events
The two attributes below can only be used in or :
Attribute Value Description
onload script Script to be run when a document load
onunload script Script to be run when a document unload
Form Events
The attributes below can be used in form elements:
Attribute Value Description
onblur script Script to be run when an element loses focus
onchange script Script to be run when an element change
onfocus script Script to be run when an element gets focus
onreset script Script to be run when a form is reset
onselect script Script to be run when an element is selectedonsubmit script Script to be run when a form is submitted
Image Events
The attribute below can be used with the img element:
http://www.w3schools.com/js/default.asphttp://www.w3schools.com/dhtml/default.asphttp://www.w3schools.com/js/default.asphttp://www.w3schools.com/dhtml/default.asp -
8/8/2019 w3 Specification
3/41
Attribute Value Description
onabort scriptScript to be run when loading of an image isinterrupted
Keyboard Events
Valid in all elements except base, bdo, br, frame, frameset, head, html, iframe, meta,param, script, style, and title.
Attribute Value Description
onkeydown script Script to be run when a key is pressed
onkeypress script Script to be run when a key is pressed and released
onkeyup script Script to be run when a key is released
Mouse Events
Valid in all elements except base, bdo, br, frame, frameset, head, html, iframe, meta,param, script, style, and title.
Attribute Value Description
onclick script Script to be run on a mouse click
ondblclick script Script to be run on a mouse double-click
onmousedown script Script to be run when mouse button is pressed
onmousemove script Script to be run when mouse pointer moves
onmouseout scriptScript to be run when mouse pointer moves out of anelement
onmouseover scriptScript to be run when mouse pointer moves over anelement
onmouseup script Script to be run when mouse button is released
HTML Tags
http://www.w3schools.com/tags/tag_comment.asphttp://www.w3schools.com/tags/tag_doctype.asphttp://www.w3schools.com/tags/tag_a.asphttp://www.w3schools.com/tags/tag_font_style.asphttp://www.w3schools.com/tags/tag_comment.asphttp://www.w3schools.com/tags/tag_doctype.asphttp://www.w3schools.com/tags/tag_a.asphttp://www.w3schools.com/tags/tag_font_style.asp -
8/8/2019 w3 Specification
4/41
-
http://www.w3schools.com/tags/tag_base.asphttp://www.w3schools.com/tags/tag_body.asphttp://www.w3schools.com/tags/tag_br.asphttp://www.w3schools.com/tags/tag_button.asphttp://www.w3schools.com/tags/tag_caption.asphttp://www.w3schools.com/tags/tag_center.asphttp://www.w3schools.com/tags/tag_phrase_elements.asphttp://www.w3schools.com/tags/tag_phrase_elements.asphttp://www.w3schools.com/tags/tag_col.asphttp://www.w3schools.com/tags/tag_colgroup.asphttp://www.w3schools.com/tags/tag_dd.asphttp://www.w3schools.com/tags/tag_dir.asphttp://www.w3schools.com/tags/tag_div.asphttp://www.w3schools.com/tags/tag_dl.asphttp://www.w3schools.com/tags/tag_dt.asphttp://www.w3schools.com/tags/tag_phrase_elements.asphttp://www.w3schools.com/tags/tag_fieldset.asphttp://www.w3schools.com/tags/tag_font.asphttp://www.w3schools.com/tags/tag_form.asphttp://www.w3schools.com/tags/tag_frame.asphttp://www.w3schools.com/tags/tag_frameset.asphttp://www.w3schools.com/tags/tag_head.asphttp://www.w3schools.com/tags/tag_hn.asphttp://www.w3schools.com/tags/tag_hr.asphttp://www.w3schools.com/tags/tag_html.asphttp://www.w3schools.com/tags/tag_iframe.asphttp://www.w3schools.com/tags/tag_img.asphttp://www.w3schools.com/tags/tag_input.asphttp://www.w3schools.com/tags/tag_label.asphttp://www.w3schools.com/tags/tag_li.asphttp://www.w3schools.com/tags/tag_link.asphttp://www.w3schools.com/tags/tag_map.asphttp://www.w3schools.com/tags/tag_menu.asphttp://www.w3schools.com/tags/tag_meta.asphttp://www.w3schools.com/tags/tag_ol.asphttp://www.w3schools.com/tags/tag_optgroup.asphttp://www.w3schools.com/tags/tag_option.asphttp://www.w3schools.com/tags/tag_p.asphttp://www.w3schools.com/tags/tag_param.asphttp://www.w3schools.com/tags/tag_pre.asphttp://www.w3schools.com/tags/tag_script.asphttp://www.w3schools.com/tags/tag_select.asphttp://www.w3schools.com/tags/tag_font_style.asphttp://www.w3schools.com/tags/tag_span.asphttp://www.w3schools.com/tags/tag_style.asphttp://www.w3schools.com/tags/tag_table.asphttp://www.w3schools.com/tags/tag_base.asphttp://www.w3schools.com/tags/tag_body.asphttp://www.w3schools.com/tags/tag_br.asphttp://www.w3schools.com/tags/tag_button.asphttp://www.w3schools.com/tags/tag_caption.asphttp://www.w3schools.com/tags/tag_center.asphttp://www.w3schools.com/tags/tag_phrase_elements.asphttp://www.w3schools.com/tags/tag_phrase_elements.asphttp://www.w3schools.com/tags/tag_col.asphttp://www.w3schools.com/tags/tag_colgroup.asphttp://www.w3schools.com/tags/tag_dd.asphttp://www.w3schools.com/tags/tag_dir.asphttp://www.w3schools.com/tags/tag_div.asphttp://www.w3schools.com/tags/tag_dl.asphttp://www.w3schools.com/tags/tag_dt.asphttp://www.w3schools.com/tags/tag_phrase_elements.asphttp://www.w3schools.com/tags/tag_fieldset.asphttp://www.w3schools.com/tags/tag_font.asphttp://www.w3schools.com/tags/tag_form.asphttp://www.w3schools.com/tags/tag_frame.asphttp://www.w3schools.com/tags/tag_frameset.asphttp://www.w3schools.com/tags/tag_head.asphttp://www.w3schools.com/tags/tag_hn.asphttp://www.w3schools.com/tags/tag_hr.asphttp://www.w3schools.com/tags/tag_html.asphttp://www.w3schools.com/tags/tag_iframe.asphttp://www.w3schools.com/tags/tag_img.asphttp://www.w3schools.com/tags/tag_input.asphttp://www.w3schools.com/tags/tag_label.asphttp://www.w3schools.com/tags/tag_li.asphttp://www.w3schools.com/tags/tag_link.asphttp://www.w3schools.com/tags/tag_map.asphttp://www.w3schools.com/tags/tag_menu.asphttp://www.w3schools.com/tags/tag_meta.asphttp://www.w3schools.com/tags/tag_ol.asphttp://www.w3schools.com/tags/tag_optgroup.asphttp://www.w3schools.com/tags/tag_option.asphttp://www.w3schools.com/tags/tag_p.asphttp://www.w3schools.com/tags/tag_param.asphttp://www.w3schools.com/tags/tag_pre.asphttp://www.w3schools.com/tags/tag_script.asphttp://www.w3schools.com/tags/tag_select.asphttp://www.w3schools.com/tags/tag_font_style.asphttp://www.w3schools.com/tags/tag_span.asphttp://www.w3schools.com/tags/tag_style.asphttp://www.w3schools.com/tags/tag_table.asp -
8/8/2019 w3 Specification
5/41
HTML Declaration
Definition: The doctype declaration should be the very first thing in an HTML
document, before the tag.
Syntax:
Types of doctype:
Transitional: It contains all HTML elements and attributes, INCLUDINGpresentational and deprecated elements (like font). Framesets are not allowed.
Frameset: This DTD is equal to HTML 4.01 Transitional, but allows the use offrameset content.
DTD The purpose of a DTD (Document Type Definition) is to define the legalbuilding blocks of an HTML document.
A DTD defines the document structure with a list of legal elements and attributes.
HTML Tag
Definition: The comment tag is used to insert a comment in the source code. A commentwill be ignored by the browser. One can use comments to explain code, which can
help while editing the source code at a later date.
Valid Syntax:
Standard Attributes: The comment tag does not support any standard attributes.
http://www.w3schools.com/tags/tag_tbody.asphttp://www.w3schools.com/tags/tag_td.asphttp://www.w3schools.com/tags/tag_textarea.asphttp://www.w3schools.com/tags/tag_tfoot.asphttp://www.w3schools.com/tags/tag_th.asphttp://www.w3schools.com/tags/tag_thead.asphttp://www.w3schools.com/tags/tag_title.asphttp://www.w3schools.com/tags/tag_tr.asphttp://www.w3schools.com/tags/tag_font_style.asphttp://www.w3schools.com/tags/tag_u.asphttp://www.w3schools.com/tags/tag_ul.asphttp://www.w3schools.com/tags/tag_tbody.asphttp://www.w3schools.com/tags/tag_td.asphttp://www.w3schools.com/tags/tag_textarea.asphttp://www.w3schools.com/tags/tag_tfoot.asphttp://www.w3schools.com/tags/tag_th.asphttp://www.w3schools.com/tags/tag_thead.asphttp://www.w3schools.com/tags/tag_title.asphttp://www.w3schools.com/tags/tag_tr.asphttp://www.w3schools.com/tags/tag_font_style.asphttp://www.w3schools.com/tags/tag_u.asphttp://www.w3schools.com/tags/tag_ul.asp -
8/8/2019 w3 Specification
6/41
HTML Tag: html:
Definition: The root element that specifies that the content of the document is HTML.The opening tag immediately follows the DOCTYPE declaration and the closing tag is the
last thing in the document. The html element must contain the head and the body
elements.
Valid Syntax:
Standard Attributes: Doctype of html. xmlns is used to define the XMLnamespace. The value must be http://www.w3.org/1999/xhtml.
HTML Tag: head:
Definition: The header of an HTML document where information about the document isplaced.
One must use the title element within the head element and meta, style, script,baseand linkcan also be used.Valid Syntax:Shiny Gongs
Standard Attributes
None.
HTML Tag: body:
Definition: The main body of an HTML document where all of the content is placed.
One must use this element and it should be used just once. It must startimmediately after the closing head tag and end directly before the closing html
tag.Valid Syntax:
[a whole body of the web page]
Standard Attributes
None.
http://htmldog.com/reference/htmltags/doctype/http://htmldog.com/reference/htmltags/head/http://htmldog.com/reference/htmltags/head/http://htmldog.com/reference/htmltags/body/http://www.w3.org/1999/xhtmlhttp://htmldog.com/reference/htmltags/title/http://htmldog.com/reference/htmltags/title/http://htmldog.com/reference/htmltags/title/http://htmldog.com/reference/htmltags/meta/http://htmldog.com/reference/htmltags/style/http://htmldog.com/reference/htmltags/script/http://htmldog.com/reference/htmltags/script/http://htmldog.com/reference/htmltags/base/http://htmldog.com/reference/htmltags/base/http://htmldog.com/reference/htmltags/link/http://htmldog.com/reference/htmltags/link/http://htmldog.com/reference/htmltags/head/http://htmldog.com/reference/htmltags/head/http://htmldog.com/reference/htmltags/html/http://htmldog.com/reference/htmltags/doctype/http://htmldog.com/reference/htmltags/head/http://htmldog.com/reference/htmltags/body/http://www.w3.org/1999/xhtmlhttp://htmldog.com/reference/htmltags/title/http://htmldog.com/reference/htmltags/meta/http://htmldog.com/reference/htmltags/style/http://htmldog.com/reference/htmltags/script/http://htmldog.com/reference/htmltags/base/http://htmldog.com/reference/htmltags/link/http://htmldog.com/reference/htmltags/head/http://htmldog.com/reference/htmltags/html/ -
8/8/2019 w3 Specification
7/41
HTML Tag: div:
Division. Defines a block of HTML. Commonly used to apply CSS to a chunk of a page.Valid Syntax:
[division part]
[division part]
Attributes:
Core attributes I18n (internationalization) attributes Event attributes.
Core Attributes: All
HTML Tag
Definition
The tag provides no visual change by itself.
The tag provides a way to add a hook to a part of a text or a part of adocument.
When the text is hooked in a span element you can add styles to the content, ormanipulate the content with for example JavaScript.
Used to make any field in form as mandatory.
Valid Syntax:
light blue
Standard Attributes: All
HTML Tag
Definition and Usage
The tag defines the relationship between a document and an externalresource.
-
8/8/2019 w3 Specification
8/41
The tag is most used to link to style sheets.
Used inside the head tag.
Valid Syntax:
Optional Attributes : All
Core Attribute: All
HTML Tag
DefinitionMetadata is information about data.
The tag provides metadata about the HTML document. Metadata will notbe displayed on the page, but will be machine parsable.
Meta elements are typically used to specify page description, keywords, author ofthe document, last modified, and other metadata.
The tag always goes inside the head element.
The metadata can be used by browsers (how to display content or reload page),search engines (keywords), or other web services.
Valid Syntax:
Required Attributes: All
Optional Attributes All
Note: Metadata is always passed as name/value pairs.
Standard Attributes: All
Event Attributes:
The tag does not support any event attributes.
-
8/8/2019 w3 Specification
9/41
HTML Tag: style
Definition and Usage
Used to define CSS at a page-level (as opposed to an external CSS file). A style element must appear inside the headelement.
The tag is used to define style information for an HTML document.
Inside the style element you specify how HTML elements should render in abrowser.
The required type attribute defines the content of the style element. The onlypossible value is "text/css".
The style element always goes inside the head section.
To link to an external style sheet, use the tag.
Valid syntax:
h1 {color:red}p {color:blue}
Attribute:
type: text/css Specifies the MIME type of the style sheet
Optional Attributes: media
Standard Attributes: all
Event AttributesThe tag does not support any event attributes.
HTML Tag: h1, h2, h3, h4, h5, and h6
Heading 1 to Heading 6 (1 being the highest level, 6 being the lowest). Headingsshould be used in order and h1 used just once.
The to tags are used to define HTML headings.
defines the largest heading and defines the smallest heading.
Valid syntax:
This is heading 1This is heading 2This is heading 3This is heading 4
http://htmldog.com/reference/htmltags/head/http://htmldog.com/reference/htmltags/head/http://www.w3schools.com/tags/tag_link.asphttp://www.w3schools.com/tags/att_style_type.asphttp://htmldog.com/reference/htmltags/head/http://www.w3schools.com/tags/tag_link.asphttp://www.w3schools.com/tags/att_style_type.asp -
8/8/2019 w3 Specification
10/41
This is heading 5This is heading 6
Optional Attributes:align
Standard Attributes: All
Event Attributes: mouse and keyboard
HTML Tag: strong
Strong emphasis.
The , , , , , , , and tags areall phrase tags. They are not deprecated, but it is possible to achieve richer effectwith CSS.
Valid syntax:
Tag Description
Renders as emphasized text
Renders as strong (highlighted) text
Defines a definition term
Defines computer code text
Defines sample computer code
Defines keyboard text
Defines a variable part of a text Defines a citation
Standard Attributes: All
Event Attributes: mouse and keyboard
HTML Tag
Definition and Usage
The tag defines an anchor. An anchor can be used in two ways:
1. To create a link to another document, by using the href attribute2. To create a bookmark inside a document, by using the name attribute
The a element is usually referred to as a link or a hyperlink.
-
8/8/2019 w3 Specification
11/41
The most important attribute of the a element is the href attribute, which indicates thelinks destination.
By default, links will appear as follows in all browsers:
An unvisited link is underlined and blue A visited link is underlined and purple An active link is underlined and red
Valid syntax:
Link to a URI
Link to a page anchor
Optional Attributes
href can be used to specify the target of a link.
charset can be used to specify the character set of the target of a link.
type can be used to specify the MIME type of the target of a link.
hreflang can be used to specify the language (in the form of a language code) of
the target of a link. It should only be used when href is also used.
rel can be used to specify the relationship of the target of the link to the current
page. rev can be used to specify the relationship of the current page to the target of the
link. accesskey can be used to associate a keyboard shortcut to the element.
tabindex can be used to specify where the element appears in the tab order of the
page.
HTML Tag
Definition and Usage
The tag specifies a default address or a default target for all links on apage.
The tag goes inside the head element.
Valid syntax:
-
8/8/2019 w3 Specification
12/41
Attributes
href
target
Standard Attributes
The tag does not support any standard attributes.
Images and Objects
HTML Tag
Definition
The tag embeds an image in an HTML page.
Notice that images are not technically inserted into an HTML page, images arelinked to HTML pages. The tag creates a holding space for the referencedimage.
The tag has two required attributes: src and alt.
The alt attribute is meant to be used as an alternative text if the image is notavailable, not as a mouse-over text. To show a mouse-over text on images orimage-maps, use the title attribute, like this:
When a web page is loaded, it is the browser, at that moment, that actually getsthe image from a web server and inserts it into the page. Therefore, make sure that
the images actually stay in the same spot in relation to the web page, otherwiseyour visitors will get a broken link icon. The broken link icon is shown if thebrowser cannot find the image.
Valid syntax:
Required Attributes
src alt
Optional Attributes
longdesc
height
-
8/8/2019 w3 Specification
13/41
width
HTML Tag
The tag defines an area inside an image-map (an image-map is an image withclickable areas).
The area element is always nested inside a tag.
Note: The usemap attribute in the tag is associated with themap element's nameattribute, and creates a relationship between the image and the map.
Valid syntax:
Required Attributes: alt
Optional Attributes: shape
poly
coordshrefnohrefaccesskeytabindex
Event Attributes: mouse and keyboard events
HTML Tag
Definition and Usage
The tag is used to define a client-side image-map. An image-map is animage with clickable areas.
The name attribute is required in the map element. This attribute is associatedwith the 's usemap attribute and creates a relationship between the imageand the map.
http://www.w3schools.com/tags/tag_img.asphttp://www.w3schools.com/tags/tag_map.asphttp://www.w3schools.com/tags/tag_map.asphttp://www.w3schools.com/tags/tag_img.asphttp://www.w3schools.com/tags/tag_map.asp -
8/8/2019 w3 Specification
14/41
The map element contains a number ofareaelements, that defines the clickableareas in the image map.
Valid syntax:
Required Attributes
id is used to uniquely identify the element.
Optional Attributes
class can be used to reference the element with CSS.
title can be used to specify a title for the element.
I18n attributes: all
Event attributes: all
http://www.w3schools.com/tags/tag_area.asphttp://www.w3schools.com/tags/tag_area.asphttp://htmldog.com/reference/htmltags/commonattributes/#i18nhttp://htmldog.com/reference/htmltags/commonattributes/#eventhttp://www.w3schools.com/tags/tag_area.asphttp://htmldog.com/reference/htmltags/commonattributes/#i18nhttp://htmldog.com/reference/htmltags/commonattributes/#event -
8/8/2019 w3 Specification
15/41
HTML Tag
Definition and Usage
The tag is used to include objects such as images, audio, videos, Java applets,ActiveX, PDF, and Flash.
The object element was intended to replace the img and applet elements. However,because of bugs and a lack of browser support this has not happened.
The object support in browsers depend on the object type. Unfortunately, the majorbrowsers use different codes to load the same object type.
Luckily, the object element provides a solution. If the object element is not displayed, thecode between the and tags will be executed. This way we canhave several nested object elements (one for each browser).
Note: The tag define run-time settings for the object
.Important: Do not use the tag for images, use the tag instead!
Valid syntax:
Required Attributes
None.
Optional Attributes
classid can be used to specify the location of the object in the form of a URL or
Windows Registry location. data can be used to specify the location of the data for the object in the form of a
URL. codebase can be used to specify the base location from which relative URLs
specified in the classid, data and archive attributes should be taken.
declare can be used to specify that the object is a declaration only. It must be
used in the format declare="declare".
http://www.w3schools.com/tags/tag_param.asphttp://www.w3schools.com/tags/tag_param.asp -
8/8/2019 w3 Specification
16/41
type can be used to specify the content type of the data specified by the data
attribute. codetype can be used to specify the content type of the object.
archive can be used to specify resources relevant to the object. The value should
be a URL or a number of URLs separated by spaces.
standby can be used to specify text that will be displayed while the object isloading.
width can be used to specify the width of the object (in pixels). This can also be
done with CSS. height can be used to specify the height of the object (in pixels). This can also be
done with CSS. name can be used to specify a name by which the object can be referenced.
tabindex can be used to specify where the element appears in the tab order of the
page.
Common attributes: all
HTML Tag
Definition and Usage
The tag is used to define parameters or variables for an object or appletelement.
Valid syntax:
Required Attributes
name is used so that the element can be referenced and processed by the object.
Optional Attributes
value can be used to specify the value of the parameter.
id can be used to uniquely identify the element.
type can be used to specify the content type.
valuetype can be used to specify the content type of the value attribute. Values
can be data, ref orobj
http://htmldog.com/reference/htmltags/commonattributes/http://htmldog.com/reference/htmltags/commonattributes/ -
8/8/2019 w3 Specification
17/41
Lists
HTML Tag
Definition and Usage
The tag defines an unordered list (a bulleted list).
Use CSS to define the type of list.
Valid syntax:
CoffeeTeaMilk
Required Attributes : none
Standard Attribute: All
HTML Tag: ol
Definition and Usage
Ordered list. Used to define a list that has a logical sequence. Used in conjunctionwith li to define the list items.
The list can be numerical or alphabetical.
Valid syntax:
CoffeeTeaMilk
Core Attributes All
http://htmldog.com/reference/htmltags/li/http://htmldog.com/reference/htmltags/li/ -
8/8/2019 w3 Specification
18/41
HTML Tag
Definition and Usage
The tag defines a list item.
The tag is used in both ordered () and unordered () lists. Use CSS to define the type of list and list item.
Valid syntax:
CoffeeTeaMilk
CoffeeTeaMilk
Required Attributes
None.
Optional Attributes
Common attributes
HTML Tag
Definition and Usage
The tag defines a definition list.
The tag is used in conjunction with (defines the item in the list) and (describes the item in the list).
Valid syntax:
http://htmldog.com/reference/htmltags/commonattributes/http://htmldog.com/reference/htmltags/commonattributes/ -
8/8/2019 w3 Specification
19/41
Coffee- black hot drink
Milk- white cold drink
Standard Attributes
Core and language
Event Attributes
Keyboard event
Mouse event
HTML Tag
Definition and Usage
The tag defines an item in a definition list.
The tag is used in conjunction with (defines the definition list) and (describes the item in the list).
Valid syntax:
Coffee
- black hot drinkMilk- white cold drink
Standard Attributes
Core and language
Event Attributes
Keyboard event
Mouse event
HTML Tag
Definition and Usage
The tag is used to describe an item in a definition list.
-
8/8/2019 w3 Specification
20/41
The tag is used in conjunction with (defines the definition list) and (defines the item in the list).
Inside a tag you can put paragraphs, line breaks, images, links, lists, etc.
Valid syntax:
Coffee- black hot drink
Milk- white cold drink
Standard Attributes
Core and language
Event Attributes Keyboard event
Mouse event
Tables
HTML Tag
Definition and Usage
The tag defines an HTML table.
A simple HTML table consists of the table element and one or more tr,th, and tdelements.
The tr element defines a table row, the th element defines a table header, and the tdelement defines a table cell.
A more complex HTML table may also include caption, col, colgroup, thead, tfoot, andtbody elements.
Valid syntax:
MonthSavings
http://www.w3schools.com/tags/tag_tr.asphttp://www.w3schools.com/tags/tag_th.asphttp://www.w3schools.com/tags/tag_th.asphttp://www.w3schools.com/tags/tag_td.asphttp://www.w3schools.com/tags/tag_tr.asphttp://www.w3schools.com/tags/tag_th.asphttp://www.w3schools.com/tags/tag_td.asp -
8/8/2019 w3 Specification
21/41
January$100
Optional Attributes:
DTD indicates in which HTML 4.01/XHTML 1.0 DTDthe attribute is allowed. S=Strict,T=Transitional, and F=Frameset.
Standard Attributes
Core and language
Event Attributes
Keyboard event
Mouse event
HTML Tag
Definition and Usage
The tag defines a row in an HTML table.
A tr element contains one or more thortd elements.
Valid syntax:
MonthSavings
January$100
Optional Attributes
DTD indicates in which HTML 4.01/XHTML 1.0 DTDthe attribute is allowed. S=Strict,T=Transitional, and F=Frameset.
Attribute Value Description
align right Aligns the content in a table row
http://www.w3schools.com/tags/tag_doctype.asphttp://www.w3schools.com/tags/tag_doctype.asphttp://www.w3schools.com/tags/tag_th.asphttp://www.w3schools.com/tags/tag_th.asphttp://www.w3schools.com/tags/tag_td.asphttp://www.w3schools.com/tags/tag_doctype.asphttp://www.w3schools.com/tags/tag_doctype.asphttp://www.w3schools.com/tags/att_tr_align.asphttp://www.w3schools.com/tags/tag_doctype.asphttp://www.w3schools.com/tags/tag_th.asphttp://www.w3schools.com/tags/tag_td.asphttp://www.w3schools.com/tags/tag_doctype.asphttp://www.w3schools.com/tags/att_tr_align.asp -
8/8/2019 w3 Specification
22/41
leftcenterjustifychar
bgcolor
rgb(x,x,x)
#xxxxxxcolorname
Deprecated. Use styles instead.Specifies a background color for a table row
char character Aligns the content in a table row to a character
charoff numberSets the number of characters the content will be alignedfrom the character specified by the char attribute
valign
topmiddlebottombaseline
Vertical aligns the content in a table row
Standard Attributes Core and language
Event Attributes
Keyboard event
Mouse event
HTML Tag
Definition and Usage
The tag defines a standard cell in an HTML table.
An HTML table has two kinds of cells:
Header cells - contains header information (created with the thelement) Standard cells - contains data (created with the td element)
The text in a th element is bold and centered.
The text in a td element is regular and left-aligned.
Use the colspan and rowspan attributes to let the content span over multiple
columns or rows!
Valid syntax:
http://www.w3schools.com/tags/att_tr_bgcolor.asphttp://www.w3schools.com/tags/att_tr_char.asphttp://www.w3schools.com/tags/att_tr_charoff.asphttp://www.w3schools.com/tags/att_tr_valign.asphttp://www.w3schools.com/tags/tag_th.asphttp://www.w3schools.com/tags/tag_th.asphttp://www.w3schools.com/tags/att_tr_bgcolor.asphttp://www.w3schools.com/tags/att_tr_char.asphttp://www.w3schools.com/tags/att_tr_charoff.asphttp://www.w3schools.com/tags/att_tr_valign.asphttp://www.w3schools.com/tags/tag_th.asp -
8/8/2019 w3 Specification
23/41
MonthSavings
January$100
Optional Attributes
DTD indicates in which HTML 4.01/XHTML 1.0 DTDthe attribute is allowed. S=Strict,T=Transitional, and F=Frameset.
Attribute Value Description DTD
abbr textSpecifies an abbreviated version of the contentin a cell
STF
align
leftrightcenterjustifychar
Aligns the content in a cell STF
axis category_name Categorizes cells STF
bgcolor
rgb(x,x,x)#xxxxxx
colorname
Deprecated. Use styles instead.
Specifies a background color for a cell TF
char character Aligns the content in a cell to a character STF
charoff numberSets the number of characters the content will bealigned from the character specified by the charattribute
STF
colspan numberSpecifies the number of columns a cell shouldspan
STF
headers headercells'_id Specifies the table headers related to a cell STF
heightpixels
%Deprecated. Use styles instead.Sets the height of a cell
TF
nowrap nowrapDeprecated. Use styles instead.Specifies that the content inside a cell should notwrap
TF
rowspan number Sets the number of rows a cell should span STF
scope colcolgrouprow
Defines a way to associate header cells and datacells in a table
STF
http://www.w3schools.com/tags/tag_doctype.asphttp://www.w3schools.com/tags/tag_doctype.asphttp://www.w3schools.com/tags/att_td_abbr.asphttp://www.w3schools.com/tags/att_td_align.asphttp://www.w3schools.com/tags/att_td_axis.asphttp://www.w3schools.com/tags/att_td_bgcolor.asphttp://www.w3schools.com/tags/att_td_char.asphttp://www.w3schools.com/tags/att_td_charoff.asphttp://www.w3schools.com/tags/att_td_colspan.asphttp://www.w3schools.com/tags/att_td_headers.asphttp://www.w3schools.com/tags/att_td_height.asphttp://www.w3schools.com/tags/att_td_nowrap.asphttp://www.w3schools.com/tags/att_td_rowspan.asphttp://www.w3schools.com/tags/att_td_scope.asphttp://www.w3schools.com/tags/tag_doctype.asphttp://www.w3schools.com/tags/att_td_abbr.asphttp://www.w3schools.com/tags/att_td_align.asphttp://www.w3schools.com/tags/att_td_axis.asphttp://www.w3schools.com/tags/att_td_bgcolor.asphttp://www.w3schools.com/tags/att_td_char.asphttp://www.w3schools.com/tags/att_td_charoff.asphttp://www.w3schools.com/tags/att_td_colspan.asphttp://www.w3schools.com/tags/att_td_headers.asphttp://www.w3schools.com/tags/att_td_height.asphttp://www.w3schools.com/tags/att_td_nowrap.asphttp://www.w3schools.com/tags/att_td_rowspan.asphttp://www.w3schools.com/tags/att_td_scope.asp -
8/8/2019 w3 Specification
24/41
rowgroup
valign
topmiddlebottombaseline
Vertical aligns the content in a cell STF
widthpixels%
Deprecated. Use styles instead.Specifies the width of a cell
Standard Attributes
Core and language
Event Attributes
Keyboard event
Mouse event
HTML Tag
Definition and Usage
The tag defines a header cell in an HTML table.
An HTML table has two kinds of cells:
Header cells - contains header information (created with the th element) Standard cells - contains data (created with the td element)
The text in a th element is bold and centered.
\he text in a td element is regular and left-aligned.
Use the colspan and rowspan attributes to let the content span over multiplecolumns or rows!
Valid syntax:
MonthSavings
January$100
http://www.w3schools.com/tags/att_td_valign.asphttp://www.w3schools.com/tags/att_td_width.asphttp://www.w3schools.com/tags/tag_td.asphttp://www.w3schools.com/tags/att_td_valign.asphttp://www.w3schools.com/tags/att_td_width.asphttp://www.w3schools.com/tags/tag_td.asp -
8/8/2019 w3 Specification
25/41
Optional Attributes
DTD indicates in which HTML 4.01/XHTML 1.0 DTDthe attribute is allowed. S=Strict,T=Transitional, and F=Frameset.
Attribute Value Description DTD
abbr textSpecifies an abbreviated version of the contentin a cell
STF
align
leftrightcenterjustifychar
Aligns the content in a cell STF
axis category_name Categorizes cells STF
bgcolor
rgb(x,x,x)
#xxxxxxcolorname
Deprecated. Use styles instead.
Specifies a background color for a cell TF
char character Aligns the content in a cell to a character STF
charoff numberSets the number of characters the content will bealigned from the character specified by the charattribute
STF
colspan number Sets the number of columns a cell should span STF
heightpixels
%Deprecated. Use styles instead.Sets the height of a cell
TF
nowrap nowrap
Deprecated. Use styles instead.
Specifies that the content inside a cell should notwrap TF
rowspan number Sets the number of rows a cell should span STF
scope
colcolgrouprowrowgroup
Defines a way to associate header cells and datacells in a table
STF
valign
topmiddlebottombaseline
Vertical aligns the content in a cell STF
widthpixels%
Deprecated. Use styles instead.Specifies the width of a cell
Standard Attributes
Core and language
http://www.w3schools.com/tags/tag_doctype.asphttp://www.w3schools.com/tags/tag_doctype.asphttp://www.w3schools.com/tags/att_th_abbr.asphttp://www.w3schools.com/tags/att_th_align.asphttp://www.w3schools.com/tags/att_th_axis.asphttp://www.w3schools.com/tags/att_th_bgcolor.asphttp://www.w3schools.com/tags/att_th_char.asphttp://www.w3schools.com/tags/att_th_charoff.asphttp://www.w3schools.com/tags/att_th_colspan.asphttp://www.w3schools.com/tags/att_th_height.asphttp://www.w3schools.com/tags/att_th_nowrap.asphttp://www.w3schools.com/tags/att_th_rowspan.asphttp://www.w3schools.com/tags/att_th_scope.asphttp://www.w3schools.com/tags/att_th_valign.asphttp://www.w3schools.com/tags/att_th_width.asphttp://www.w3schools.com/tags/tag_doctype.asphttp://www.w3schools.com/tags/att_th_abbr.asphttp://www.w3schools.com/tags/att_th_align.asphttp://www.w3schools.com/tags/att_th_axis.asphttp://www.w3schools.com/tags/att_th_bgcolor.asphttp://www.w3schools.com/tags/att_th_char.asphttp://www.w3schools.com/tags/att_th_charoff.asphttp://www.w3schools.com/tags/att_th_colspan.asphttp://www.w3schools.com/tags/att_th_height.asphttp://www.w3schools.com/tags/att_th_nowrap.asphttp://www.w3schools.com/tags/att_th_rowspan.asphttp://www.w3schools.com/tags/att_th_scope.asphttp://www.w3schools.com/tags/att_th_valign.asphttp://www.w3schools.com/tags/att_th_width.asp -
8/8/2019 w3 Specification
26/41
Event Attributes
Keyboard event
Mouse event
HTML Tag
Definition and Usage
The tag is used to group the body content in an HTML table.
The tbody element should be used in conjunction with the theadandtfootelements.
The thead element is used to group the header content in an HTML table and the tfootelement is used to group the footer content in an HTML table.
must appear before within a table, so that a browser can render the footbefore receiving all the rows of data.
Notice that these elements will not affect the layout of the table by default. However, youcan use CSS to let these elements affect the table's layout.
Valid syntax:
MonthSavings
Sum$180
January$100
February$80
http://www.w3schools.com/tags/tag_thead.asphttp://www.w3schools.com/tags/tag_thead.asphttp://www.w3schools.com/tags/tag_tfoot.asphttp://www.w3schools.com/tags/tag_tfoot.asphttp://www.w3schools.com/tags/tag_tfoot.asphttp://www.w3schools.com/tags/tag_thead.asphttp://www.w3schools.com/tags/tag_tfoot.asp -
8/8/2019 w3 Specification
27/41
Optional Attributes
DTD indicates in which HTML 4.01/XHTML 1.0 DTDthe attribute is allowed. S=Strict,T=Transitional, and F=Frameset.
Attribute Value Description DTD
align
rightleftcenterjustifychar
Aligns the content inside the tbody element STF
char characterAligns the content inside the tbody element to acharacter
STF
charoff numberSets the number of characters the content insidethe tbody element will be aligned from thecharacter specified by the char attribute
STF
valign
topmiddlebottombaseline
Vertical aligns the content inside the tbodyelement
STF
Standard Attributes
Core and language
Event Attributes
Keyboard event
Mouse event
HTML Tag
Definition and Usage
The tag is used to group the header content in an HTML table.
The thead element should be used in conjunction with the tbodyandtfootelements.
The tbody element is used to group the body content in an HTML table and thetfoot element is used to group the footer content in an HTML table.
must appear before within a table, so that a browser can renderthe foot before receiving all the rows of data.
http://www.w3schools.com/tags/tag_doctype.asphttp://www.w3schools.com/tags/tag_doctype.asphttp://www.w3schools.com/tags/att_tbody_align.asphttp://www.w3schools.com/tags/att_tbody_char.asphttp://www.w3schools.com/tags/att_tbody_charoff.asphttp://www.w3schools.com/tags/att_tbody_valign.asphttp://www.w3schools.com/tags/tag_tbody.asphttp://www.w3schools.com/tags/tag_tbody.asphttp://www.w3schools.com/tags/tag_tfoot.asphttp://www.w3schools.com/tags/tag_tfoot.asphttp://www.w3schools.com/tags/tag_doctype.asphttp://www.w3schools.com/tags/att_tbody_align.asphttp://www.w3schools.com/tags/att_tbody_char.asphttp://www.w3schools.com/tags/att_tbody_charoff.asphttp://www.w3schools.com/tags/att_tbody_valign.asphttp://www.w3schools.com/tags/tag_tbody.asphttp://www.w3schools.com/tags/tag_tfoot.asp -
8/8/2019 w3 Specification
28/41
Notice that these elements will not affect the layout of the table by default.However, you can use CSS to let these elements affect the table's layout.
Optional Attributes
DTD indicates in which HTML 4.01/XHTML 1.0 DTDthe attribute is allowed. S=Strict,T=Transitional, and F=Frameset.
Attribute Value Description DTD
align
rightleftcenterjustifychar
Aligns the content inside the thead element STF
char characterAligns the content inside the thead element to acharacter
STF
charoff numberSets the number of characters the content insidethe thead element will be aligned from thecharacter specified by the char attribute
STF
valign
topmiddlebottombaseline
Vertical aligns the content inside the theadelement
STF
Standard Attributes
Core and language
Event Attributes
Keyboard event
Mouse event
HTML Tag
Definition and Usage
The tag is used to group the footer content in an HTML table.
The tfoot element should be used in conjunction with thethead and tbodyelements.
http://www.w3schools.com/tags/tag_doctype.asphttp://www.w3schools.com/tags/tag_doctype.asphttp://www.w3schools.com/tags/att_thead_align.asphttp://www.w3schools.com/tags/att_thead_char.asphttp://www.w3schools.com/tags/att_thead_charoff.asphttp://www.w3schools.com/tags/att_thead_valign.asphttp://www.w3schools.com/tags/tag_thead.asphttp://www.w3schools.com/tags/tag_thead.asphttp://www.w3schools.com/tags/tag_tbody.asphttp://www.w3schools.com/tags/tag_tbody.asphttp://www.w3schools.com/tags/tag_doctype.asphttp://www.w3schools.com/tags/att_thead_align.asphttp://www.w3schools.com/tags/att_thead_char.asphttp://www.w3schools.com/tags/att_thead_charoff.asphttp://www.w3schools.com/tags/att_thead_valign.asphttp://www.w3schools.com/tags/tag_thead.asphttp://www.w3schools.com/tags/tag_tbody.asp -
8/8/2019 w3 Specification
29/41
The thead element is used to group the header content in an HTML table and the tbodyelement is used to group the body content in an HTML table.
Note: must appear before within a table, so that a browser can renderthe foot before receiving all the rows of data.
Notice that these elements will not affect the layout of the table by default. However, youcan use CSS to let these elements affect the table's layout.
Optional Attributes
DTD indicates in which HTML 4.01/XHTML 1.0 DTDthe attribute is allowed. S=Strict,T=Transitional, and F=Frameset.
Attribute Value Description DTD
align
right
leftcenterjustifychar
Aligns the content inside the tfoot element STF
char characterAligns the content inside the tfoot element to acharacter
STF
charoff numberSets the number of characters the content insidethe tfoot element will be aligned from thecharacter specified by the char attribute
STF
valign
top
middlebottombaseline
Vertical aligns the content inside the tfootelement STF
Standard Attributes
Core and language
Event Attributes
Keyboard event
Mouse event
http://www.w3schools.com/tags/tag_doctype.asphttp://www.w3schools.com/tags/tag_doctype.asphttp://www.w3schools.com/tags/att_tfoot_align.asphttp://www.w3schools.com/tags/att_tfoot_char.asphttp://www.w3schools.com/tags/att_tfoot_charoff.asphttp://www.w3schools.com/tags/att_tfoot_valign.asphttp://www.w3schools.com/tags/tag_doctype.asphttp://www.w3schools.com/tags/att_tfoot_align.asphttp://www.w3schools.com/tags/att_tfoot_char.asphttp://www.w3schools.com/tags/att_tfoot_charoff.asphttp://www.w3schools.com/tags/att_tfoot_valign.asp -
8/8/2019 w3 Specification
30/41
HTML Tag
Definition and Usage
The tag defines attribute values for one or more columns in a table.
The tag is useful for applying styles to entire columns, instead of repeatingthe styles for each cell, for each row.
The tag can only be used inside a table or a colgroup element
Tip: Add the style attribute to the tag, and let CSS take care of backgrounds,width and borders. These are the ONLY CSS properties that work with the tag.
Valid syntax:
ISBNTitlePrice
3476896My first HTML
$53
Optional Attributes
DTD indicates in which HTML 4.01/XHTML 1.0 DTDthe attribute is allowed. S=Strict,T=Transitional, and F=Frameset.
Attribute Value Description DTD
align
leftrightcenterjustifychar
Specifies the alignment of the content related to a colelement
STF
char characterSpecifies the alignment of the content related to a colelement to a character
STF
charoff number Specifies the number of characters the content will be STF
http://www.w3schools.com/tags/tag_doctype.asphttp://www.w3schools.com/tags/tag_doctype.asphttp://www.w3schools.com/tags/att_col_align.asphttp://www.w3schools.com/tags/att_col_char.asphttp://www.w3schools.com/tags/att_col_charoff.asphttp://www.w3schools.com/tags/tag_doctype.asphttp://www.w3schools.com/tags/att_col_align.asphttp://www.w3schools.com/tags/att_col_char.asphttp://www.w3schools.com/tags/att_col_charoff.asp -
8/8/2019 w3 Specification
31/41
aligned from the character specified by the charattribute
span numberSpecifies the number of columns a col elementshould span
STF
valign
top
middlebottombaseline
Specifies the vertical alignment of the content relatedto a col element
STF
width%
pixelsrelative_length
Specifies the width of a col element STF
Standard Attributes
Core and language
Event Attributes Keyboard event
Mouse event
HTML Tag
Definition and Usage
The tag is used to group columns in a table for formatting.
The tag is useful for applying styles to entire columns, instead ofrepeating the styles for each cell, for each row.
The tag can only be used inside a table element.
Tip: Add the style attribute to the tag, and let CSS take care ofbackgrounds, width and borders. These are the ONLY CSS properties that workwith the tag.
Optional Attributes
Same as
Standard Attributes
Core and language
Event Attributes
Keyboard event
Mouse event
http://www.w3schools.com/tags/att_col_span.asphttp://www.w3schools.com/tags/att_col_valign.asphttp://www.w3schools.com/tags/att_col_width.asphttp://www.w3schools.com/tags/att_col_span.asphttp://www.w3schools.com/tags/att_col_valign.asphttp://www.w3schools.com/tags/att_col_width.asp -
8/8/2019 w3 Specification
32/41
HTML Tag
Definition and Usage
The tag defines a table caption.
The tag must be inserted immediately after the tag. You canspecify only one caption per table. Usually the caption will be centered above thetable.
Valid syntax:
Monthly savingsMonthSavings
January$100
Optional Attributes
Align
Standard Attributes
Core and language
Event Attributes
Keyboard event
Mouse event
HTML Tag
Definition and Usage
The tag is used to create an HTML form for user input.
A form can contain input elements like text fields, checkboxes, radio-buttons,submit buttons and more. A form can also contain select menus, textarea, fieldset,legend, and label elements.
Forms are used to pass data to a server.
Note: The form element is a block-level element, and creates a line break beforeand after itself.
-
8/8/2019 w3 Specification
33/41
Valid syntax:
First name:
Last name:Required Attributes
Action
Optional Attributes
Attribute Value Description DTD
accept MIME_typeSpecifies the types of files thatcan be submitted through a fileupload
STF
accept-charset charsetSpecifies the character-sets theserver can handle for form-data
STF
enctype
application/x-www-form-urlencodedmultipart/form-datatext/plain
Specifies how form-data shouldbe encoded before sending it to aserver
STF
methodgetpost
Specifies how to send form-data STF
name name Specifies the name for a form TF
target
_blank
_self_parent_topframename
Deprecated. Specifies where toopen the action UR
Standard Attributes
Core and language
Event Attributes
Keyboard event Mouse event
HTML Tag
Definition and Usage
The tag is used to select user information.
http://www.w3schools.com/tags/att_form_accept.asphttp://www.w3schools.com/tags/att_form_accept_charset.asphttp://www.w3schools.com/tags/att_form_enctype.asphttp://www.w3schools.com/tags/att_form_method.asphttp://www.w3schools.com/tags/att_form_name.asphttp://www.w3schools.com/tags/att_form_target.asphttp://www.w3schools.com/tags/att_form_accept.asphttp://www.w3schools.com/tags/att_form_accept_charset.asphttp://www.w3schools.com/tags/att_form_enctype.asphttp://www.w3schools.com/tags/att_form_method.asphttp://www.w3schools.com/tags/att_form_name.asphttp://www.w3schools.com/tags/att_form_target.asp -
8/8/2019 w3 Specification
34/41
An input field can vary in many ways, depending on the type attribute. An inputfield can be a text field, a checkbox, a password field, a radio button, a button,and more.
Valid syntax:
First name:
Last name:Standard Attributes
Core and language
Event Attributes
Keyboard event Mouse event
HTML Tag
Definition and Usage
The tag defines a multi-line text input control.
A text area can hold an unlimited number of characters, and the text renders in afixed-width font (usually Courier).
The size of a textarea can be specified by the cols and rows attributes, or even
better; through CSS' height and width properties.
Valid syntax:
At W3Schools you will find all the Web-building tutorials you need, from basic HTMLto advanced XML, SQL, ASP, and PHP.
Required Attributes
Col,
Rows
Optional Attributes
disabled
name
readonly
-
8/8/2019 w3 Specification
35/41
Standard Attributes
Core and language
Event Attributes
Keyboard event
Mouse event
HTML Tag
Definition and Usage
The tag is used to create a select list (drop-down list).
The tags inside the select element define the available options in the list.
Tip: The select element is a form control and can be used in a form to collect userinput.
Optional Attributes
disabled
name
multiple
size
Standard Attributes
Core and language
Event Attributes
Keyboard event Mouse event
HTML Tag
Definition and Usage
The tag defines an option in a select list.
The option element goes inside the select element.
Tip: If you have a long list of options, you can group together related optionswith the tag.
Valid syntax:
VolvoSaabMercedes
http://www.w3schools.com/tags/tag_optgroup.asphttp://www.w3schools.com/tags/tag_optgroup.asp -
8/8/2019 w3 Specification
36/41
Audi
Optional Attributes
disabled
labelselected
value
Standard Attributes
Core and language
Event Attributes
Keyboard event
Mouse event
HTML Tag
VolvoSaab
MercedesAudi
Definition and Usage
The tag is used to group together related options in a select list.
If you have a long list of options, groups of related options are easier to handle for theuser.
Required attributed:
label
Optional Attributes
disabled
Standard Attributes
Core and language
-
8/8/2019 w3 Specification
37/41
Event Attributes
Keyboard event
Mouse event
HTML Tag
Definition and Usage
The tag defines a push button.
Inside a button element you can put content, like text or images. This is thedifference between this element and buttons created with the input element.
Always specify the type attribute for the button. The default type for InternetExplorer is "button", while in other browsers (and in the W3C specification) it is"submit".
Valid syntax:
Click Me!
Optional Attributes
disabled
label
name
value
Standard Attributes
Core and language
Event Attributes
Keyboard eventMouse event
HTML Tag
Definition and Usage
The 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 onthe text within the label element, it toggles the control.
The for attribute of the tag should be equal to the id attribute of therelated element to bind them together.
-
8/8/2019 w3 Specification
38/41
Valid syntax:
Male
Female
Optional Attributes
for
Standard Attributes
Core and language
Event Attributes Keyboard event
Mouse event
HTML Tag
Definition and Usage
The tag is used to logically group together elements in a form.
The tag draws a box around the related form elements.
The tag defines a caption for the fieldset element.
Valid syntax:
Personalia:Name:
Email:
Date of birth:Standard Attributes
Core and language
Event Attributes
Keyboard event
-
8/8/2019 w3 Specification
39/41
Mouse event
HTML Tag
Definition and Usage
The tag defines one particular window (frame) within a frameset.
Each frame in a frameset can have different attributes, such as border, scrolling,the ability to resize, etc.
Valid syntax:
Optional Attributes
DTD indicates in which HTML 4.01/XHTML 1.0 DTDthe attribute is allowed. S=Strict,T=Transitional, and F=Frameset.
Attribute Value Description DTD
frameborder01
Specifies whether or not to display a border around aframe
F
longdesc URLSpecifies a page that contains a long description of thecontent of a frame
F
marginheight pixels Specifies the top and bottom margins of a frame F
marginwidth pixels Specifies the left and right margins of a frame F
name name Specifies the name of a frame F
noresize noresize Specifies that a frame cannot be resized F
scrollingyesnoauto
Specifies whether or not to display scrollbars in a
frameF
src URL Specifies the URL of the document to show in a frameF
Standard Attributes
The tag supports the following standard attributes:
http://www.w3schools.com/tags/tag_doctype.asphttp://www.w3schools.com/tags/tag_doctype.asphttp://www.w3schools.com/tags/att_frame_frameborder.asphttp://www.w3schools.com/tags/att_frame_longdesc.asphttp://www.w3schools.com/tags/att_frame_marginheight.asphttp://www.w3schools.com/tags/att_frame_marginwidth.asphttp://www.w3schools.com/tags/att_frame_name.asphttp://www.w3schools.com/tags/att_frame_noresize.asphttp://www.w3schools.com/tags/att_frame_scrolling.asphttp://www.w3schools.com/tags/att_frame_src.asphttp://www.w3schools.com/tags/tag_doctype.asphttp://www.w3schools.com/tags/att_frame_frameborder.asphttp://www.w3schools.com/tags/att_frame_longdesc.asphttp://www.w3schools.com/tags/att_frame_marginheight.asphttp://www.w3schools.com/tags/att_frame_marginwidth.asphttp://www.w3schools.com/tags/att_frame_name.asphttp://www.w3schools.com/tags/att_frame_noresize.asphttp://www.w3schools.com/tags/att_frame_scrolling.asphttp://www.w3schools.com/tags/att_frame_src.asp -
8/8/2019 w3 Specification
40/41
Attribute Value Description DTD
class classname Specifies a classname for an element F
id id Specifies a unique id for an element F
style style_definition Specifies an inline style for an element F
title text Specifies extra information about an element F
Event Attributes
According to the W3C, the tag does not support any event attributes.
However, the onload event is supported in all browsers.
HTML Tag
Definition and Usage
The tag defines a frameset.
The frameset element holds two or more frame elements. Each frame elementholds a separate document.
The frameset element states only how many columns or rows there will be in theframeset.
Note: If you want to validate a page containing frames, be sure the doctype is setto "Frameset DTD". Read more about doctypes.
Important: You cannot use the body element together with the frameset element.However, if you add a tag containing some text for browsers that donot support frames, you will have to enclose the text in a body element.
Valid syntax:
Optional Attributes
Attribute Value Description DTD
colspixels
%*
Specifies the number and size of columns in a frameset F
http://www.w3schools.com/tags/tag_doctype.asphttp://www.w3schools.com/tags/att_frameset_cols.asphttp://www.w3schools.com/tags/tag_doctype.asphttp://www.w3schools.com/tags/att_frameset_cols.asp -
8/8/2019 w3 Specification
41/41
rowspixels
%*
Specifies the number and size of rows in a frameset F
Event Attributes
According to the W3C, the tag does not support any event attributes.
However, the onload event is supported in all browsers.
http://www.w3schools.com/tags/att_frameset_rows.asphttp://www.w3schools.com/tags/att_frameset_rows.asp