HTML 5 - Elements

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

<a>

The HTML <a> Element (or the HTML Anchor Element) defines a hyperlink, the named target destination for a hyperlink, or both. Content categories: Flow content, phrasing content, interactive content, palpable content. Permitted content: Transparent, containing either flow content or phrasing content. Tag omission: None, both the starting and ending tag are mandatory. Permitted parent elements: Any element that accepts phrasing content, or any element that accepts flow content. DOM interfaceHTML: AnchorElement Attributes This element includes the global attributes. download HTML5 This attribute, if present, indicates that the author intends the hyperlink to be used for downloading a resource so that when the user clicks on the link they will be prompted to save it as a local file. If the attribute has a value, the value will be used as the pre-filled file name in the Save prompt that opens when the user clicks on the link (the user can change the name before actually saving the file of course). There are no restrictions on allowed values (though / and \ will be converted to underscores, preventing specific path hints), but you should consider that most file systems have limitations with regard to what punctuation is supported in file names, and browsers are likely to adjust file names accordingly. Note: Can be used with blob: URLs and data: URLs, to make it easy for users to download content that is generated programmatically using JavaScript (e.g. a picture created using an online drawing Web app). If the HTTP header Content-Disposition: is present and gives a different filename than this attribute, the HTTP header has priority over this attribute. If this attribute is present and Content-Disposition: is set to inline, Firefox gives priority to Content-Disposition, like for the filename case, while Chrome gives priority to the download attribute. In Firefox 20 this attribute is only honored for links to resources with the same-origin. href This was the single required attribute for anchors defining a hypertext source link, but is no longer required in HTML5. Omitting this attribute creates a placeholder link. The href attribute indicates the link target, either a URL or a URL fragment. A URL fragment is a name preceded by a hash mark (#), which specifies an internal target location (an ID) within the current document. URLs are not restricted to Web (HTTP)-based documents. URLs might use any protocol supported by the browser. For example, file, ftp, and mailto work in most user agents. Note: You can use the special fragment "top" to create a link back to the top of the page; for example <a href="#top">Return to top</a>. This behavior is specified by HTML5. media HTML5 This attribute specifies the media which the linked resource applies to. Its value must be a media query. This attribute is mainly useful when linking to external stylesheets by allowing the user agent to pick the best adapted one for the device it runs on. Usage note: In HTML 4, only simple white-space-separated list of media description literals, i.e. media types and groups, where defined and allowed as values for this attribute, like print, screen, aural, braille, ... HTML 5 extended this to any kind of media queries, which are a superset of the allowed values of HTML 4. Browsers not supporting the CSS3 Media Queries won't necessarily recognize the adequate link; do not forget to set fallback links, the restricted set of media queries defined in HTML 4. ping HTML5 The 'ping' attribute, if present, sends the URLs of the resources a notification/ping if the user follows the hyperlink. rel For anchors containing the href attribute, this attribute specifies the relationship of the target object to the link object. The value is a comma-separated list of link types values. The values and their semantics will be registered by some authority that might have meaning to the document author. The default relationship, if no other is given, is void. Use this attribute only if the href attribute is present. target This attribute specifies where to display the linked resource. In HTML4, this is the name of, or a keyword for, a frame. In HTML5, it is a name of, or keyword for, a browsing context (for example, tab, window, or inline frame). The following keywords have special meanings: _self: Load the response into the same HTML4 frame (or HTML5 browsing context) as the current one. This value is the default if the attribute is not specified. _blank: Load the response into a new unnamed HTML4 window or HTML5 browsing context. _parent: Load the response into the HTML4 frameset parent of the current frame or HTML5 parent browsing context of the current one. If there is no parent, this option behaves the same way as _self. _top: In HTML4: Load the response into the full, original window, canceling all other frames. In HTML5: Load the response into the top-level browsing context (that is, the browsing context that is an ancestor of the current one, and has no parent). If there is no parent, this option behaves the same way as _self. Use this attribute only if the href attribute is present. charset Obsolete since HTML5 This attribute defines the character encoding of the linked resource. The value is a space- and/or comma-delimited list of character sets as defined in RFC 2045. The default value is ISO-8859-1. Usage note: This attribute is obsolete in HTML5 and should not be used by authors. To achieve its effect, use the HTTP Content-Type header on the linked resource. coords HTML 4 only, Obsolete since HTML5 For use with object shapes, this attribute uses a comma-separated list of numbers to define the coordinates of the object on the page. datafld This attribute specifies the column name from that data source object that supplies the bound data. Usage note: This attribute is non-standard and should not be used by authors. To achieve its effect, use scripting and a mechanism such as XMLHttpRequest to populate the page dynamically Support Gecko Presto WebKit Trident Not implemented Not implemented Not implemented IE4, IE5, IE6, IE7 (Removed in IE8) Normative document Microsoft's Data Binding: dataFld Property (MSDN) datasrc This attribute indicates the ID of the data source object that supplies the data that is bound to this element. Usage note: This attribute is non-standard and should not be used by authors. To achieve its effect, use scripting and a mechanism such as XMLHttpRequest to populate the page dynamically. Support Gecko Presto WebKit Trident Not implemented Not implemented Not implemented IE4, IE5, IE6, IE7 (Removed in IE8) Normative document Microsoft's Data Binding: dataSrc Property (MSDN) hreflang This attribute indicates the language of the linked resource. It is purely advisory. Allowed values are determined by BCP47 for HTML5 and by RFC1766 for HTML4. Use this attribute only if the href attribute is present. methods The value of this attribute provides information about the functions that might be performed on an object. The values generally are given by the HTTP protocol when it is used, but it might (for similar reasons as for the title attribute) be useful to include advisory information in advance in the link. For example, the browser might choose a different rendering of a link as a function of the methods specified; something that is searchable might get a different icon, or an outside link might render with an indication of leaving the current site. This attribute is not well understood nor supported, even by the defining browser, Internet Explorer 4. Methods Property (MSDN) name HTML 4 only, Obsolete since HTML5 This attribute is required in an anchor defining a target location within a page. A value for name is similar to a value for the id core attribute and should be an alphanumeric identifier unique to the document. Under the HTML 4.01 specification, id and name both can be used with the <a> element as long as they have identical values. Usage note: This attribute is obsolete in HTML5, use global attribute id instead. rev HTML 4 only, Obsolete since HTML5 This attribute specifies a reverse link, the inverse relationship of the rel attribute. It is useful for indicating where an object came from, such as the author of a document. shape HTML 4 only, Obsolete since HTML5 This attribute is used to define a selectable region for hypertext source links associated with a figure to create an image map. The values for the attribute are circle, default, polygon, and rect. The format of the coords attribute depends on the value of shape. For circle, the value is x,y,r where x and y are the pixel coordinates for the center of the circle and r is the radius value in pixels. For rect, the coords attribute should be x,y,w,h. The x,y values define the upper-left-hand corner of the rectangle, while w and h define the width and height respectively. A value of polygon for shape requires x1,y1,x2,y2,... values for coords. Each of the x,y pairs defines a point in the polygon, with successive points being joined by straight lines and the last point joined to the first. The value default for shape requires that the entire enclosed area, typically an image, be used. Note: It is advisable to use the usemap attribute for the <img> element and the associated <map> element to define hotspots instead of the shape attribute. type This attribute specifies the media type in the form of a MIME type for the link target. Generally, this is provided strictly as advisory information; however, in the future a browser might add a small icon for multimedia types. For example, a browser might add a small speaker icon when type is set to audio/wav. For a complete list of recognized MIME types, see http://www.w3.org/TR/html4/references.html#ref-MIMETYPES. Use this attribute only if the href attribute is present. urn This supposedly Microsoft-supported attribute relates a uniform resource name (URN) with the link. While it is based on standards work years back, the meaning of URNs is still not well defined, so this attribute is meaningless. urn Property (MSDN) Example: Linking to an external location <!-- anchor linking to external file --> <a href="http://www.mozilla.com/"> External Link </a> Result External Link Example: Creating a clickable image This small example use an image to link to the MDN home page. The home page will open in a new browsing context, that is a new page or a new tab. <a href="https://developer.mozilla.org/en-US/" target="_blank"> <img src="https://mdn.mozillademos.org/files/6851/mdn_logo.png" alt="MDN logo" /> </a>

<audio>

The HTML <audio> element is used to embed sound content in documents. It may contain several audio sources, represented using the src attribute or the <source> element; the browser will choose the most suitable one. Fallback content for browser not supporting the <audio> element can be added too. You can use the enhanced audio API features — which are Gecko-specific — to directly generate and manipulate audio streams from JavaScript code. See Introducing the audio API extension for details. Usage Context Content categoriesFlow content, phrasing content, embedded content. If it has a controls attribute: interactive content and palpable content. Permitted contentIf the element has a src attribute: zero or more <track> element, followed by transparent content that contains no media elements, that is no <audio> or <video> Else: zero or more <source> element, followed by zero or more <track> element, followed by transparent content that contains no media elements, that is no <audio> or <video>. Tag omission None, both the starting and ending tag are mandatory. Permitted parent elements Any element that accepts embedded content. DOM interfaceHTMLAudioElement Attributes This element includes the global attributes. autoplay A Boolean attribute; if specified (even if the value is "false"!), the audio will automatically begin to play back as soon as it can do so without stopping to finish loading the data. autobuffer Obsolete since Gecko 2.0 A Boolean attribute; if specified, the audio will automatically begin being downloaded, even if not set to automatically play. This continues until the media cache is full, or the entire audio file has been downloaded, whichever comes first. This should only be used when it is expected that the user will choose to play the audio; for example, if the user has navigated to a page using a "Play this audio" link. This attribute was removed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) in favor of the preload attribute. buffered An attribute you can read to determine which time ranges of the media have been buffered. This attribute contains a TimeRanges object. controls If this attribute is present, the browser will offer controls to allow the user to control audio playback, including volume, seeking, and pause/resume playback. loop A Boolean attribute; if specified, we will, upon reaching the end of the audio, automatically seek back to the start. mozCurrentSampleOffset The offset, specified as the number of samples since the beginning of the audio stream, at which the audio is currently playing. muted A Boolean attribute which indicates whether the audio will be initially silenced. Its default value is false, meaning that the audio will be played. played A TimeRanges object indicating all the ranges of the audio that have been played. preload This enumerated attribute is intended to provide a hint to the browser about what the author thinks will lead to the best user experience. It may have one of the following values: none: hints that either the author thinks that the user won't need to consult that audio or that the server wants to minimize its traffic; in others terms this hint indicates that the audio should not be cached; metadata: hints that though the author thinks that the user won't need to consult that audio, fetching the metadata (e.g. length) is reasonable; auto: hints that the user needs have priority; in others terms this hint indicated that, if needed, the whole audio could be downloaded, even if the user is not expected to use it; the empty string: which is a synonym of the auto value. If not set, its default value is browser-defined (i.e. each browser can choose its own default value), though the spec advises it to be set to metadata. Usage notes: The autoplay attribute has precedence over this one as if one wants to automatically play a audio, the browser will obviously need to download it. Setting both the autoplay and the preload attributes is allowed by the specification. The browser is not forced by the specification to follow the value of this attribute; it is a mere hint. src The URL of the audio to embed. This is subject to HTTP access controls. This is optional; you may instead use the <source> element within the audio block to specify the audio to embed. volume The playback volume of any audio portions, in the range 0.0 (silent) to 1.0 (loudest). Time offsets are specified as float values indicating the number of seconds to offset. Note: The time offset value definition has not yet been completed in the HTML5 specification and is subject to change. Events An audio element can fire various events. Examples Basic usage <!-- Simple audio playback --> <audio src="http://developer.mozilla.org/@api/deki/files/2926/=AudioTest_(1).ogg" autoplay> Your browser does not support the <code>audio</code> element. </audio> <!-- Audio playback with captions --> <audio src="foo.ogg"> <track kind="captions" src="foo.en.vtt" srclang="en" label="English"> <track kind="captions" src="foo.sv.vtt" srclang="sv" label="Svenska"> </audio> Audio element with source element <audio controls="controls"> Your browser does not support the <code>audio</code> element. <source src="foo.wav" type="audio/wav"> </audio>

<iframe>

The HTML <iframe> Element (or HTML inline frame element) represents a nested browsing context, effectively embedding another HTML page into the current page. In HTML 4.01, a document may contain a head and a body or a head and a frame-set, but not both a body and a frame-set. However, an <iframe> can be used within a normal document body. Each browsing context has its own session history and active document. The browsing context that contains the embedded content is called the parent browsing context. The top-level browsing context (which has no parent) is typically the browser window. Content categoriesFlow content, phrasing content, embedded content, interactive content, palpable content. Permitted contentSpecial, see prose Tag omission None, both the starting and ending tag are mandatory. Permitted parent elements Any element that accepts embedded content. DOM interfaceHTMLIFrameElement Attributes This element includes the global attributes. align Deprecated since HTML4.01, Obsolete since HTML5 The alignment of this element with respect to the surrounding context. allowfullscreen This attribute can be set to true if the frame is allowed to be placed into full screen mode by calling its element.mozRequestFullScreen() method. If this isn't set, the element can't be placed into full screen mode. frameborder HTML 4 only The value 1 (the default) tells the browser to draw a border between this frame and every other frame. The value 0 tells the browser not to draw a border between this frame and other frames. height Indicates the height of the frame HTML5 in CSS pixels, or HTML 4.01 in pixels or as a percentage. longdesc HTML 4 only A URI of a long description of the frame. Due to widespread misuse, this is not helpful for non-visual browsers. marginheight HTML 4 only The amount of space in pixels between the frame's content and its top and bottom margins. marginwidth HTML 4 only The amount of space in pixels between the frame's content and its left and right margins. mozallowfullscreen Use allowfullscreen instead. In Gecko 9.0 or later, this attribute can be set to true if the frame is allowed to be placed into full screen mode by calling its element.mozRequestFullScreen() method. If this isn't set, the element can't be placed into full screen mode. webkitallowfullscreen Use allowfullscreen instead. In Chrome 17 or later (and maybe earlier), this attribute can be set to true if the frame is allowed to be placed into full screen mode by calling its element.webkitRequestFullScreen() method. If this isn't set, the element can't be placed into full screen mode. mozapp Only available on Firefox OS For frames hosting an open web app, this specifies the URL of the app manifest. This ensures that the app is loaded with the right permissions. See Using the Browser API for details. Available in Gecko 13.0 and later. mozbrowser Only available on Firefox OS Indicates that the frame is to appear like a top-level browser window to the embedded content. This means that window.top, window.parent, window.frameElement, etc. will not reflect the frame hierarchy. This allows for a web browser UI to be implemented entirely with web technology, given the right permissions. See Using the Browser API for details. Available in Gecko 13.0 and later. name A name for the embedded browsing context (or frame). This can be used as the value of the target attribute of an <a> or <form> element, or the formtarget attribute of an <input> or <button> element. remote Only available on Firefox OS Load the frame's page in a separate content process. scrolling HTML 4 only Enumerated attribute indicating when the browser should provide a scroll bar (or other scrolling device) for the frame: auto: Only when needed. yes: Always provide a scroll bar. no: Never provide a scoll bar. sandbox HTML5 only If specified as an empty string, this attribute enables extra restrictions on the content that can appear in the inline frame. The value of the attribute can either be an empty string (all the restrictions are applied), or a space-separated list of tokens that lift particular restrictions. Valid tokens are: allow-same-origin: Allows the content to be treated as being from its normal origin. If this keyword is not used, the embedded content is treated as being from a unique origin. allow-top-navigation: Allows the embedded browsing context to navigate (load) content to the top-level browsing context. If this keyword is not used, this operation is not allowed. allow-forms: Allows the embedded browsing context to submit forms. If this keyword is not used, this operation is not allowed. allow-popups: Allows popups (like from window.open). allow-scripts: Allows the embedded browsing context to run scripts (but not create pop-up windows). If this keyword is not used, this operation is not allowed. allow-pointer-lock: Allows the embedded browsing context to use the Pointer Lock API. Note: When the embedded document has the same origin as the main page, it is strongly discouraged to use both allow-scripts and allow-same-origin at the same time, as that allows the embedded document to programmatically remove the sandbox attribute. Although it is accepted, this case is no more secure than not using the sandbox attribute. Sandboxing in general is only of minimal help if the attacker can arrange for the potentially hostile content to be displayed in the user's browser outside a sandboxed iframe. It is recommended that such content should be served from a separate dedicated domain, to limit the potential damage. The sandbox attribute is not supported in Internet Explorer 9 and earlier versions, or in Opera. seamless HTML5 only This Boolean attribute indicates that the browser should render the inline frame in a way that makes it appear to be part of the containing document, for example by applying CSS styles that apply to the <iframe> to the contained document before styles specified in that document, and by opening links in the contained documents in the parent browsing context (unless another setting prevents this). In XHTML, attribute minimization is forbidden, and the seamless attribute must be defined as <iframe seamless="seamless">. src The URL of the page to embed. srcdoc HTML5 only The content of the page that the embedded context is to contain. This attribute is expected to be used together with the sandbox and seamless attributes. If a browser supports the srcdoc attribute, it will override the content specified in the src attribute (if present). If a browser does NOT support the srcdoc attribute, it will show the file specified in the src attribute instead (if present). width Indicates the width of the frame HTML5 in CSS pixels, or HTML 4.01 in pixels or as a percentage. Scripting Inline frames, like <frame> elements, enter the window.frames pseudo-array. From the DOM iframe element, scripts can get access to the window object of the included HTML page via the contentWindow property. The contentDocument property refers to the document element inside the iframe (this is equivalent to contentWindow.document), but is not supported by Internet Explorer versions before IE8. From the inside of a frame, a script can get a reference to the parent window via window.parent. Scripts trying to access a frame's content are subject to the same-origin policy, and cannot access most of the properties in the other window object if it was loaded from a different domain. This also applies to a script inside a frame trying to access its parent window. Cross-domain communication can still be achieved with window.postMessage. Example 1 <script> var iframe = window.getElementsByTagName( "iframe" )[ 0 ]; alert( "Frame title: " + iframe.contentWindow.title ); </script> <iframe src="page.html" width="300" height="300"> <p>Your browser does not support iframes.</p> </iframe> Example 2: Open link inside iframe in another tab <base target="_blank" /> <iframe width="400" height="215" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?f=q&source=s_q&hl=es-419&geocode=&q=buenos+aires&sll=37.0625,-95.677068&sspn=38.638819,80.859375&t=h&ie=UTF8&hq=&hnear=Buenos+Aires,+Argentina&z=11&ll=-34.603723,-58.381593&output=embed"> </iframe><br /> <small> <a href="https://maps.google.com/maps?f=q&source=embed&hl=es-419&geocode=&q=buenos+aires&sll=37.0625,-95.677068&sspn=38.638819,80.859375&t=h&ie=UTF8&hq=&hnear=Buenos+Aires,+Argentina&z=11&ll=-34.603723,-58.381593" style="color:#0000FF;text-align:left"> See bigger map </a> </small>

<img>

The HTML <img> Element (or HTML Image Element) represents an image of the document. Usage note: Browsers do not always display the image referenced by the element. This is the case for non-graphical browsers (including those used by people with vision impairments), or if the user chooses not to display images, or if the browser is unable to display the image because it is invalid or an unsupported type. In these cases, the browser may replace the image with the text defined in this element's alt attribute. Content categoriesFlow content, phrasing content, embedded content, palpable content. If the element has a usemap attribute, it also is a part of the interactive content category. Permitted content None, it is an empty element. Tag omission Must have a start tag and must not have an end tag. Permitted parent elements Any element that accepts embedded content. DOM interfaceHTMLImageElement Attributes This element includes the global attributes. align Deprecated since HTML4.01, Obsolete since HTML5 Use the vertical-align CSS property The alignment of the image with respect to its surrounding context. alt This attribute defines the alternative text describing the image. Users will see this displayed if the image URL is wrong, the image is not in one of the supported formats, or until the image is downloaded. Usage note: Omitting this attribute indicates that the image is a key part of the content, but no textual equivalent is available. Setting this attribute to the empty string indicates that this image is not a key part of the content; non-visual browsers may omit it from rendering. border Deprecated since HTML4.01, Obsolete since HTML5 The width of a border around the image. crossorigin HTML5 This enumerated attribute indicates if the fetching of the related image must be done using CORS or not. CORS-enabled images can be reused in the <canvas> element without being tainted. The allowed values are: anonymous A cross-origin request (i.e. with Origin: HTTP header) is performed. But no credential is sent (i.e. no cookie, no X.509 certificate and no HTTP Basic authentication is sent). If the server does not give credentials to the origin site (by not setting the Access-Control-Allow-Origin: HTTP header), the image will be tainted and its usage restricted.. use-credentials A cross-origin request (i.e. with Origin: HTTP header) performed with credential is sent (i.e. a cookie, a certificate and HTTP Basic authentication is performed). If the server does not give credentials to the origin site (through Access-Control-Allow-Credentials: HTTP header), the image will be tainted and its usage restricted. When not present, the resource is fetched without a CORS request (i.e. without sending the Origin: HTTP header), preventing its non-tainted usage in <canvas> elements. If invalid, it is handled as if the enumerated keyword anonymous was used. See CORS settings attributes for additional information. height The height of the image in HTML5 CSS pixels, or HTML 4 in pixels or as a percentage. hspace Deprecated since HTML4.01, Obsolete since HTML5 The number of pixels of white space to insert to the left and right of the image. ismap This Boolean attribute indicates that the image is part of a server-side map. If so, the precise coordinates of a click are sent to the server. Usage note: This attribute is allowed only if the <img> element is a descendant of an <a> element with a valid href attribute. longdescHTML 4 only The URL of a description of the image to be displayed, which supplements the alt text. In HTML5, use a regular <a> element to link to the description. name Deprecated since HTML4.01, Obsolete since HTML5 A name for the element. It is supported in HTML 4 only for backward compatibility. Use the id attribute instead. src Image URL, this attribute is obligatory for the <img> element. On browsers supporting srcset, src is ignored if this one is provided. srcsetHTML5 A list of one or more strings separated by commas indicating a set of possible images for the user agent to use. Each string is composed of: one URL to an image, a width descriptor, that is a positive integer directly followed by 'w'. The default value, if missing, is the infinity. a pixel density descriptor, that is a positive floating number directly followed by 'x'. The default value, if missing, is 1x. Each string in the list must have at least a width descriptor or a pixel density descriptor to be valid. Among the list, there must be only one string containing the same tuple of width descriptor and pixel density descriptor. The browser chooses the most adequate image to display at a given point of time. width The width of the image in pixels or percent. usemap The partial URL (starting with '#') of an image map associated with the element. Usage note: You cannot use this attribute if the <img> element is a descendant of an <a> or <button> element. vspace Deprecated since HTML4.01, Obsolete since HTML5 The number of pixels of white space to insert above and below the image. Supported image formats The HTML standard doesn't give a list of image format that must be supported, so each user agent supports a different set of formats. Gecko supports: JPEG GIF, including animated GIFs PNG APNG SVG BMP BMP ICO PNG ICO Note: Support for the XBM format has been removed in Gecko 1.9.2. Interaction with CSS Regarding CSS, an <img> is a replaced element. It has no baseline, meaning, when used in an inline formatting context with vertical-align: baseline, the bottom of the image will be posed on the container's baseline. Depending of its type, an image may have an intrinsic dimension, but this is not a necessary condition: a SVG image has no intrinsic dimension, a raster image has one. Example 1 <img src="mdn-logo-sm.png" alt="MD Logo" /> MD Logo Example 2: Image link <a href="https://developer.mozilla.org/"><img src="mdn-logo-sm.png" alt="MDN Logo" /> </a> MDN Logo Example 3: Using the srcset attribute The src attribute is ignored on browsers supporting srcset when this one is provided. The displayed images will depend of the type of screen. <img src="mdn-logo-sm.png" alt="MD Logo" srcset="mdn-logo-HD.png 2x, mdn-logo-small.png 15w, mdn-banner-HD.png 100w 2x" />

<video>

The HTML <video> element is used to embed video content. It may contain several video sources, represented using the src attribute or the <source> element; the browser will choose the most suitable one. For a list of supported formats, see Media formats supported by the audio and video elements. Usage context Content categoriesFlow content, phrasing content, embedded content. If it has a controls attribute: interactive content and palpable content. Permitted contentIf the element has a src attribute: zero or more <track> element, followed by transparent content that contains no media elements, that is no <audio> or <video> Else: zero or more <source> element, followed by zero or more <track> element, followed by transparent content that contains no media elements, that is no <audio> or <video>. Tag omission None, both the starting and ending tag are mandatory. Permitted parent elements Any element that accepts embedded content. DOM interfaceHTMLVideoElement Attributes Like all other HTML elements, this element supports the global attributes. autoplay A Boolean attribute; if specified, the video will automatically begin to play back as soon as it can do so without stopping to finish loading the data. autobuffer A Boolean attribute; if specified, the video will automatically begin buffering even if it's not set to automatically play. This should be used for cases in which it is considered likely that the video will be played (for example, if the user navigated to the page specifically to play the video, not if there happens to be a video embedded along with other content). The video is buffered until the media cache is full. Implementation note: though part of the early drafts of the HTML5 specification, the autobuffer attribute has been removed in later releases. It has been removed from Gecko 2.0 and other browsers, and never implemented in some. The spec defines a new enumerated attribute, preload, to replace the autobuffer attribute, with a different syntax. bug 548523 buffered An attribute you can read to determine which time ranges of the media have been buffered. This attribute contains a TimeRanges object. controls If this attribute is present, Gecko will offer controls to allow the user to control video playback, including volume, seeking, and pause/resume playback. crossorigin This enumerated attribute indicates if the fetching of the related image must be done using CORS or not. CORS-enabled resources can be reused in the <canvas> element without being tainted. The allowed values are: anonymous A cross-origin request (i.e. with Origin: HTTP header) is performed. But no credential is sent (i.e. no cookie, no X.509 certificate and no HTTP Basic authentication is sent). If the server does not give credentials to the origin site (by not setting the Access-Control-Allow-Origin: HTTP header), the image will be tainted and its usage restricted.. use-credentials A cross-origin request (i.e. with Origin: HTTP header) is performed with credential is sent (i.e. a cookie, a certificate and HTTP Basic authentication is performed). If the server does not give credentials to the origin site (through Access-Control-Allow-Credentials: HTTP header), the image will be tainted and its usage restricted. When not present, the resource is fetched without a CORS request (i.e. without sending the Origin: HTTP header), preventing its non-tainted used in <canvas> elements. If invalid, it is handled as if the enumerated keyword anonymous was used. See CORS settings attributes for additional information. height The height of the video's display area, in CSS pixels. loop A Boolean attribute; if specified, we will, upon reaching the end of the video, automatically seek back to the start. muted A Boolean attribute which indicates the default setting of the audio contained in the video. If set, the audio will be initially silenced. Its default value is false, meaning that the audio will be played when the video is played. played A TimeRanges object indicating all the ranges of the video that have been played. preload This enumerated attribute is intended to provide a hint to the browser about what the author thinks will lead to the best user experience. It may have one of the following values: none: hints that either the author thinks that the user won't need to consult that video or that the server wants to minimize its traffic; in others terms this hint indicates that the video should not be cached. metadata: hints that though the author thinks that the user won't need to consult that video, fetching the metadata (e.g. length) is reasonable. auto: hints that the user needs have priority; in others terms this hint indicated that, if needed, the whole video could be downloaded, even if the user is not expected to use it. the empty string: which is a synonym of the auto value. If not set, its default value is browser-defined (i.e. each browser can choose its own default value), though the spec advises it to be set to metadata. Usage notes: The autoplay attribute has precedence over this one as if one wants to automatically play a video, the browser will obviously need to download it. Setting both the autoplay and the preload attributes is allowed by the specification. The browser is not forced by the specification to follow the value of this attribute; it is a mere hint. poster A URL indicating a poster frame to show until the user plays or seeks. If this attribute isn't specified, nothing is displayed until the first frame is available; then the first frame is displayed as the poster frame. src The URL of the video to embed. This is optional; you may instead use the <source> element within the video block to specify the video to embed. width The width of the video's display area, in CSS pixels. Time offsets are currently specified as a float value representing the number of seconds to offset. Note: The time offset value definition has not yet been completed in the HTML 5 specification and is subject to change. Events The video element can fire many different events. Examples <!-- Simple video example --> <video src="videofile.ogg" autoplay poster="posterimage.jpg"> Sorry, your browser doesn't support embedded videos, but don't worry, you can <a href="videofile.ogg">download it</a> and watch it with your favorite video player! </video> <!-- Video with subtitles --> <video src="foo.ogg"> <track kind="subtitles" src="foo.en.vtt" srclang="en" label="English"> <track kind="subtitles" src="foo.sv.vtt" srclang="sv" label="Svenska"> </video> The first example plays a video, starting playback as soon as enough of the video has been received to allow playback without pausing to download more. Until the video starts playing, the image "posterimage.jpg" is displayed in its place. The second example allows the user to choose between different subtitles.

<main>

Does not work in IE. The HTML <main> element represents the main content of the <body> of a document or application. The main content area consists of content that is directly related to, or expands upon the central topic of a document or the central functionality of an application. This content should be unique to the document, excluding any content that is repeated across a set of documents such as sidebars, navigation links, copyright information, site logos, and search forms (unless, of course, the document's main function is as a search form). Note: <main> must not be a descendent of an <article>, <aside>, <footer>, <header>, or <nav> element. There is no restriction as to the number of <main> elements in a document. Indeed, there are many cases where it would make sense to have multiple <main> elements. For example, a page with multiple <article> elements might need to indicate the dominant contents of each such element. Content categoriesFlow content, palpable content. Permitted contentFlow content. Tag omission None; both the starting and ending tags are mandatory. Permitted parent elements Any element that accepts flow content, but may not be a descendent of an <article>, <aside>, <footer>, <header>, or <nav> element. DOM interfaceHTMLElement Attributes This element only includes the global attributes.

List all of the sectioning elements in html5

Sectioning content or Sectioning rootelement <article> <aside> <nav> <section> <blockquote> <body> <details> <fieldset> <figure> <td>

<abbr>

The HTML <abbr> Element (or HTML Abbreviation Element) represents an abbreviation and optionally provides a full description for it. If present, the title attribute must contain this full description and nothing else. Usage note: When present, the grammatical number of the text in the title attribute should match that of the content of the <abbr> element. This is also the case in languages with more than two grammatical numbers (for example, Arabic not only has singular and plural categories, but also a dual category). Content categoriesFlow content, phrasing content, palpable content Permitted contentPhrasing content. Tag omission None, both the starting and ending tag are mandatory. Permitted parent elements Any element that accepts phrasing content. DOM interfaceHTMLElement Up to Gecko 1.9.2 (Firefox 3.6) inclusive, Firefox implemented the HTMLSpanElement interface for this element. Attributes This element only includes the global attributes. Use the title attribute to define the full description of the abbreviation. Many user agents present this as a tooltip. Default styling The purpose of this element is purely for the convenience of the author and all browsers display it inline (display: inline) by default, though its default styling varies from one browser to another: Some browsers, like Internet Explorer, do not style it differently than a <span> element. Opera, Firefox, and some others add a dotted underline to the content of the element. A few browsers not only add a dotted underline, but also put it in small caps; to avoid this styling, adding something like font-variant: none in the CSS takes care of this case. It is therefore strongly recommended that web authors not rely on the default styling. Note that this element is not supported by Internet Explorer prior to IE7. As these IE versions don't allow styling for unknown elements, the following script is necessary to allow it: <!--[if lte IE 6]> <script> document.createElement("abbr"); </script> <![endif]--> Example <p>Tony Blair is the prime minister of the <abbr title="United Kingdom">UK</abbr></p>

<address>

The HTML <address> Element may be used by authors to supply contact information for its nearest <article> or <body> ancestor; in the latter case, it applies to the whole document. Usage note: To represent an arbitrary address, one that is not related to the contact information, use a <p> element rather than the <address> element. This element should not contain more information than the contact information, like a publication date (which belongs in a <time> element). Typically an <address> element can be placed inside the <footer> element of the current section, if any. Content categoriesFlow content, palpable content. Permitted contentFlow content, but with no nested <address> element, no heading content (<hgroup>, <h1>, <h2>, <h3>, <h4>, <h5>, <h6>), no sectioning content (<article>, <aside>, <section>, <nav>), and no <header> or <footer> element. Tag omission None, both the starting and ending tag are mandatory. Permitted parent elements Any element that accepts flow content. DOM interfaceHTMLElement Prior to Gecko 2.0 (Firefox 4), Gecko implemented this element using the HTMLSpanElement interface Attributes This element only includes the global attributes. Example <address> You can contact author at <a href="http://www.somedomain.com/contact">www.somedomain.com</a>.<br> If you see any bugs, please <a href="mailto:[email protected]">contact webmaster</a>.<br> You may also want to visit us:<br> Mozilla Foundation<br> 1981 Landings Drive<br> Building K<br> Mountain View, CA 94043-0801<br> USA </address>

<article>

The HTML <article> Element represents a self-contained composition in a document, page, application, or site, which is intended to be independently distributable or reusable, e.g., in syndication. This could be a forum post, a magazine or newspaper article, a blog entry, a user-submitted comment, an interactive widget or gadget, or any other independent item of content. Each <article> should be identified, typically by including a heading (h1-h6 element) as a child of the <article> element. Usage notes: When an <article> element is nested, the inner element represents an article related to the outer element. For example, the comments of a blog post can be <article> elements nested in the <article> representing the blog post. Author information of an <article> element can be provided through the <address> element, but it doesn't apply to nested <article> elements. The publication date and time of an <article> element can be described using the pubdate attribute of a <time> element. Content categoriesFlow content, sectioning content, palpable content. Permitted contentFlow content. Tag omission None, both the starting and ending tag are mandatory. Permitted parent elements Any element that accepts flow content. Note that an <article> element must not be a descendant of an <address> element. DOM interfaceHTMLElement Attributes This element only includes the global attributes.

<b>

The HTML <b> Element represents a span of text stylistically different from normal text, without conveying any special importance or relevance. It is typically used for keywords in a summary, product names in a review, or other spans of text whose typical presentation would be boldfaced. Another example of its use is to mark the lead sentence of each paragraph of an article. Usage notes: Do not confuse the <b> element with the <strong>, <em>, or <mark> elements. The <strong> element represents text of certain importance, <em> puts some emphasis on the text and the <mark> element represents text of certain relevance. The <b> element doesn't convey such special semantic information; use it only when no others fit. Similarly, do not mark titles and headings using the <b> element. For this purpose, use the <h1> to <h6> tags. Further, stylesheets can change the default style of these elements, with the result that they are not necessarily displayed in bold. It is a good practice to use the class attribute on the <b> in order to convey additional semantic information (for example <b class="lede"> for the first sentence in a paragraph). This eases the development of several stylings of a web document, without the need to change its HTML code. Historically, the <b> element was meant to make text boldface. Styling information has been deprecated since HTML4, so the meaning of the <b> element has been changed. If there is no semantic purpose on using the <b> element, using css property font-weight with bold value would be a better choice for making text bold. Content categoriesFlow content, phrasing content, palpable content. Permitted contentPhrasing content. Tag omission None, both the starting and ending tag are mandatory. Permitted parent elements Any element that accepts phrasing content. DOM interfaceHTMLElement Up to Gecko 1.9.2 (Firefox 4) inclusive, Firefox implements the HTMLSpanElement interface for this element. Attributes This element only includes the global attributes.

<bdi>

The HTML <bdi> Element (or Bi-Directional Isolation Element) isolates a span of text that might be formatted in a different direction from other text outside it. This element is useful when embedding text with an unknown directionality, from a database for example, inside text with a fixed directionality. Though the same visual effect can be achieved using the CSS rule unicode-bidi: isolate on a <span> or another text-formatting element, the semantic meaning is only conveyed by the <bdi> element. Especially, browsers are allowed to ignore CSS styling. In such a case, the text would still be correctly displayed using the HTML element, but will become garbage when using the CSS styling to convey semantic. Content categoriesFlow content, phrasing content, palpable content. Permitted contentPhrasing content. Tag omission None, both the starting and ending tag are mandatory. Permitted parent elements Any element that accepts phrasing content. DOM interfaceHTMLElement Attributes Like all other HTML elements, this element has the global attributes, with a slight semantic difference: the dir attribute is not inherited. If not set, its default value is the auto which let the browser decide the direction based on the element's content.

<bdo>

The HTML <bdo> Element (or HTML bidirectional override element) is used to override the current directionality of text. It causes the directionality of the characters to be ignored in favor of the specified directionality. Usage Context Content categoriesFlow content, phrasing content, palpable content. Permitted contentPhrasing content. Tag omission None, both the starting and ending tag are mandatory. Permitted parent elements Any element that accepts phrasing content. DOM interfaceHTMLElement Up to Gecko 1.9.2 (Firefox 4) inclusive, Firefox implements the HTMLSpanElement interface for this element. Attributes This element includes the global attributes. dir Text direction in this element. Possible values are: ltr: Indicates that the text should go in a left-to-right direction. rtl: Indicates that the text should go in a right-to-left direction. auto: The browser decides which direction based on the element's content. Examples <!-- Switch text direction --> <p>This text will go left to right.</p> <p><bdo dir="rtl">This text will go right to left.</bdo></p> Result This text will go left to right. .tfel ot thgir og lliw txet sihT.

<cite>

The HTML <cite> Element (or HTML Citation Element) represents a reference to a creative work. It must include the title of a work, the name of the author, or a URL reference, which may be in an abbreviated form according to the conventions used for the addition of citation metadata. Usage Notes: A creative work may include a book, a paper, an essay, a poem, a score, a song, a script, a film, a TV show, a game, a sculpture, a painting, a theater production, a play, an opera, a musical, an exhibition, a legal case report, a computer program, , a web site, a web page, a blog post or comment, a forum post or comment, a tweet, a written or oral statement, etc. Use the cite attribute on a <blockquote> or <q> element to reference an online resource for a source. Content categoriesFlow content, phrasing content, palpable content. Permitted contentPhrasing content. Tag omission None, both the starting and ending tag are mandatory. Permitted parent elements Any element that accepts phrasing content. DOM interfaceHTMLElement Up to Gecko 1.9.2 (Firefox 4) inclusive, Firefox implements the HTMLSpanElement interface for this element. Attributes This element only includes the global attributes. Example More information can be found in <cite>[ISO-0000]</cite>. The HTML above outputs: More information can be found in [ISO-0000].

<code>

The HTML <code> Element represents a fragment of computer code. By default, it is displayed in the browser's default monospace font. Content categoriesFlow content, phrasing content, palpable content. Permitted contentPhrasing content. Tag omission None, both the starting and ending tag are mandatory. Permitted parent elements Any element that accepts phrasing content. DOM interfaceHTMLElement Up to Gecko 1.9.2 (Firefox 4) inclusive, Firefox implements the HTMLSpanElement interface for this element. Attributes This element only includes the global attributes. Example <p>Regular text. <code>This is code.</code> Regular text.</p> Result Regular text. This is code. Regular text.

<dfn>

The HTML <dfn> element (or HTML Definition Element) represents the defining instance of a term. HTML5 Usage Notes: The <dfn> element marks the term being defined; the definition of the term should be given by the surrounding <p>, <section> or definition list group (usually a <dt>, <dd> pair). The exact value of the term being defined is determined by the following rules: If the <dfn> element has a title attribute, then the term is the value of that attribute. Else, if it contains only an <abbr> element with a title attribute, then the term is the value of that attribute. Otherwise, the text content of the <dfn> element is the term being defined. Content categoriesFlow content, phrasing content, palpable content. Permitted contentPhrasing content, but no <dfn> element must be a descendant. Tag omission None, both the starting and ending tag are mandatory. Permitted parent elements Any element that accepts phrasing content. DOM interfaceHTMLElement Attributes This element includes the global attributes. In HTML5, the title attribute has special meaning, as noted above. Examples The following examples are valid in HTML5. <!-- Define "The Internet" --> <p><dfn id="def-internet">The Internet</dfn> is a global system of interconnected networks that use the Internet Protocol Suite (TCP/IP) to

<em>

The HTML <em> element (or HTML Emphasis Element) marks text that has stress emphasis. The <em> element can be nested, with each level of nesting indicating a greater degree of emphasis. Usage Note: Typically this element is displayed in italic type. However, it should not be used simply to apply italic styling; use the CSS styling for that purpose. Use the <cite> element to mark the title of a work (book, play, song, etc.); it is also typically styled with italic type, but carries different meaning. Use the <strong> element to mark text that has greater importance than surrounding text. Content categoriesFlow content, phrasing content, palpable content Permitted contentPhrasing content. Tag omission None, both the starting and ending tag are mandatory. Permitted parent elements Any element that accepts phrasing content. DOM interfaceHTMLElement Up to Gecko 1.9.2 (Firefox 4) inclusive, Firefox implements the HTMLSpanElement interface for this element. Attributes This element only includes the global attributes.

<figcaption>

The HTML <figcaption> Element represents a caption or a legend associated with a figure or an illustration described by the rest of the data of the <figure> element which is its immediate ancestor which means <figcaption> can be the first or last element inside a <figure> block. Also, the HTML Figcaption Element is optional; if not provided, then the parent figure element will have no caption. Content categories None. Permitted contentFlow content. Tag omission None, both the starting and ending tag are mandatory. Permitted parent elements A <figure> element; the <figcaption> element must be its first or last child. DOM interfaceHTMLElement Attributes This element only includes the global attributes.

<figure>

The HTML <figure> Element represents self-contained content, frequently with a caption (<figcaption>), and is typically referenced as a single unit. While it is related to the main flow, its position is independent of the main flow. Usually this is an image, an illustration, a diagram, a code snippet, or a schema that is referenced in the main text, but that can be moved to another page or to an appendix without affecting the main flow. Usage notes: Being a sectioning root, the outline of the content of the <figure> element is excluded from the main outline of the document. A caption can be associated with the <figure> element by inserting a <figcaption> inside it (as the first or the last child). Content categoriesFlow content, sectioning root, palpable content. Permitted content A <figcaption> element, followed by flow content; or flow content followed by a <figcaption> element; or flow content. Tag omission None, both the starting and ending tag are mandatory. Permitted parent elements Any element that accepts Flow content. DOM interfaceHTMLElement Attributes This element only includes the global attributes.

<footer>

The HTML <footer> Element represents a footer for its nearest sectioning content or sectioning root element (i.e, its nearest parent <article>, <aside>, <nav>, <section>, <blockquote>, <body>, <details>, <fieldset>, <figure>, <td>). A footer typically contains information about the author of the section, copyright data or links to related documents. Usage notes: Enclose information about the author in an <address> element that can be included into the <footer> element. The <footer> element is not sectioning content and therefore doesn't introduce a new section in the outline. Content categoriesFlow content, palpable content. Permitted contentFlow content, but with no <footer> or <header> descendants. Tag omission None, both the starting and ending tag are mandatory. Permitted parent elements Any element that accepts flow content. Note that a <footer> element must not be a descendant of an <address>, <header> or another <footer> element. DOM interfaceHTMLElement Attributes This element only includes the global attributes.

<header>

The HTML <header> Element represents a group of introductory or navigational aids. It may contain some heading elements but also other elements like a logo, wrapped section's header, a search form, and so on. Usage note: The <header> element is not sectioning content and therefore doesn't introduce a new section in the outline. Content categoriesFlow content, palpable content. Permitted contentFlow content, but with no <header> or <footer> descendant Tag omission None, both the starting and ending tag are mandatory. Permitted parent elements Any element that accepts flow content. Note that a <header> element must not be a descendant of an <address>, <footer> or another <header> element.. DOM interfaceHTMLElement Attributes This element only includes the global attributes.

<i>

The HTML <i> Element represents a range of text that is set off from the normal text for some reason, for example, technical terms, foreign language phrases, or fictional character thoughts. It is typically displayed in italic type. Content categoriesFlow content, phrasing content, palpable content. Permitted contentPhrasing content. Tag omission None, both the starting and ending tag are mandatory. Permitted parent elements Any element that accepts phrasing content. DOM interfaceHTMLElement Up to Gecko 1.9.2 (Firefox 4) inclusive, Firefox implements the HTMLSpanElement interface for this element. Attributes This element only includes the global attributes. Example <p>The Latin phrase <i>Veni, vidi, vici</i> is often mentioned in music, art, and literature</p>

<kbd>

The HTML <kbd> Element (or HTML Keyboard Input Element) represents user input and produces an inline element displayed in the browser's default monospace font. Content categoriesFlow content, phrasing content, palpable content. Permitted contentPhrasing content. Tag omission None, both the starting and ending tag are mandatory. Permitted parent elements Any element that accepts phrasing content. DOM interfaceHTMLElement Up to Gecko 1.9.2 (Firefox 4) inclusive, Firefox implements the interface HTMLSpanElement for this element. Attributes This element only includes the global attributes.

<mark>

The HTML <mark> Element represents highlighted text, i.e., a run of text marked for reference purpose, due to its relevance in a particular context. For example it can be used in a page showing search results to highlight every instance of the searched for word. Usage notes: In a quotation or another block, the highlighted text typically marks text that is referenced outside the quote, or marked for specific scrutiny even though the original author didn't consider it important. In the main text, the highlighted text typically marks text that may be of special relevance for the user's current activity, like search results. Do not use the <mark> element for syntax highlighting; use the <span> element for this purpose. Do not confuse the <mark> element with the <strong> element. The <strong> element is used to denote spans of text of importance in context of the text, when the <mark> element is used to denote spans of text of relevance to a different context. Content categoriesFlow content, phrasing content, palpable content. Permitted contentPhrasing content. Tag omission None, both the starting and ending tag are mandatory. Permitted parent elements Any element that accepts phrasing content. DOM interfaceHTMLElement Attributes This element only includes the global attributes.

<meter>

The HTML <meter> Element represents either a scalar value within a known range or a fractional value. Usage note: Unless the value attribute is between 0 and 1 (inclusive), the min attribute and max attribute should define the range so that the value attribute's value is within it. Content categoriesFlow content, phrasing content, labelable content, palpable content. Permitted contentPhrasing content, but there must be no <meter> element among its descendants. Tag omission None, both the starting and ending tag are mandatory. Permitted parent elements Any element that accepts phrasing content. DOM interfaceHTMLMeterElement Attributes This element includes the global attributes. value The current numeric value. This must be between the minimum and maximum values (min attribute and max attribute) if they are specified. If unspecified or malformed, the value is 0. If specified, but not within the range given by the min attribute and max attribute, the value is equal to the nearest end of the range. min The lower numeric bound of the measured range. This must be less than the maximum value (max attribute), if specified. If unspecified, the minimum value is 0. max The upper numeric bound of the measured range. This must be greater than the minimum value (min attribute), if specified. If unspecified, the maximum value is 1. low The upper numeric bound of the low end of the measured range. This must be greater than the minimum value (min attribute), and it also must be less than the high value and maximum value (high attribute and max attribute, respectively), if any are specified. If unspecified, or if less than the minimum value, the low value is equal to the minimum value. high The lower numeric bound of the high end of the measured range. This must be less than the maximum value (max attribute), and it also must be greater than the low value and minimum value (low attribute and min attribute, respectively), if any are specified. If unspecified, or if greater than the maximum value, the high value is equal to the maximum value. optimum This attribute indicates the optimal numeric value. It must be within the range (as defined by the min attribute and max attribute). When used with the low attribute and high attribute, it gives an indication where along the range is considered preferable. For example, if it is between the min attribute and the low attribute, then the lower range is considered preferred. form This attribute associates the element with a form element that has ownership of the meter element. For example, a meter might be displaying a range corresponding to an input element of type number. This attribute is only used if the meter element is being used as a form-associated element; even then, it may be omitted if the element appears as a descendant of a form element.

<progress>

The HTML <progress> Element is used to view the completion progress of a task. While the specifics of how it's displayed is left up to the browser developer, it's typically displayed as a progress bar. Javascript can be used to manipulate the value of progress bar. Content categoriesFlow content, phrasing content, labelable content, palpable content. Permitted contentPhrasing content, but there must be no <progress> element among its descendants. Tag omission None, both the starting and ending tag are mandatory. Permitted parent elements Any element that accepts phrasing content. DOM interfaceHTMLProgressElement Attributes This element includes the global attributes. max This attribute describes how much work the task indicated by the progress element requires. The max attribute, if present, must have a value greater than zero and be a valid floating point number. value This attribute specifies how much of the task that has been completed. It must be a valid floating point number between 0 and max, or between 0 and 1 if max is omitted. If there is no value attribute, the progress bar is indeterminate; this indicates that an activity is ongoing with no indication of how long it is expected to take. You can use the orient property to specify whether the progress bar should be rendered horizontally (the default) or vertically. The :indeterminate pseudo-class can be used to match against indeterminate progress bars.

<p>

The HTML <q> Element (or HTML Quote Element) indicates that the enclosed text is a short inline quotation. This element is intended for short quotations that don't require paragraph breaks; for long quotations use <blockquote> element. Content categoriesFlow content, phrasing content, palpable content. Permitted contentPhrasing content. Tag omission None, both the starting and ending tag are mandatory. Permitted parent elements Any element that accepts phrasing content. DOM interfaceHTMLQuoteElement Attributes This element includes the global attributes. cite The value of this attribute is a URL that designates a source document or message for the information quoted. This attribute is intended to point to information explaining the context or the reference for the quote. Example <p>Everytime Kenny is killed, Stan will announce <q cite="http://en.wikipedia.org/wiki/Kenny_McCormick#Cultural_impact"> Oh my God, you/they killed Kenny! </q>. </p>

<rp>

The HTML <rp> element is used to provide fall-back parenthesis for browsers non-supporting ruby annotations. Ruby annotations are for showing pronounciation of East Asian characters, like using Japanese furigana or Taiwainese bopomofo characters. The <rp> element is used in the case of lack of <ruby> element support its content has what should be displayed in order to indicate the presence of a ruby annotation, usually parentheses. Content categories None. Permitted contentPhrasing content. Tag omission None, both the starting and ending tag are mandatory. Permitted parent elements A <ruby> element. <rp> must be positioned immediately before or after an <rt> element. DOM interfaceHTMLElement Attributes This element only includes the global attributes. Example <ruby> 漢 <rp>(</rp><rt>Kan</rt><rp>)</rp> 字 <rp>(</rp><rt>ji</rt><rp>)</rp> </ruby>

<rt>

The HTML <rt> Element embraces pronunciation of character presented in a ruby annotations, which are for showing pronunciation of East Asian characters and the <rt> element is used inside of <ruby> element. Content categories None. Permitted contentPhrasing content. Tag omission None, both the starting and ending tag are mandatory. Permitted parent elements A <ruby> element. DOM interfaceHTMLElement Attributes This element only includes the global attributes. Example <ruby> 漢 <rt>Kan</rt> 字 <rt>ji</rt> </ruby>

<ruby>

The HTML <ruby> Element represents a ruby annotation. Ruby annotations are for showing pronounciation of East Asian characters. Content categoriesFlow content, phrasing content, palpable content. Permitted contentPhrasing content. Tag omission None, both the starting and ending tag are mandatory. Permitted parent elements See prose DOM interfaceHTMLElement Attributes This element only includes the global attributes. Examples Example 1: Character <ruby> 漢 <rp>(</rp><rt>Kan</rt><rp>)</rp> 字 <rp>(</rp><rt>ji</rt><rp>)</rp> </ruby>

<samp>

The HTML <samp> element is an element intended to identify sample output from a computer program. It is usually displayed in the browser's default monotype font (such as Lucida Console). Content categoriesFlow content, phrasing content, palpable content. Permitted contentPhrasing content. Tag omissionNone, both the starting and ending tag are mandatory. Permitted parent elementsAny element that accepts phrasing content. DOM interfaceHTMLElement Attributes This element only includes the global attributes. DOM Interface This element implements the HTMLElement interface. Implementation note: up to Gecko 1.9.2 inclusive, Firefox implements the HTMLSpanElement interface for this element. Example <p>Regular text. <samp>This is sample text.</samp> Regular text.</p>

<span>

The HTML <span> element is a generic inline container for phrasing content, which does not inherently represent anything. It can be used to group elements for styling purposes (using the class or id attributes), or because they share attribute values, such as lang. It should be used only when no other semantic element is appropriate. <span> is very much like a <div> element, but <div> is a block-level element whereas a <span> is an inline element. Content categoriesFlow content, phrasing content. Permitted contentPhrasing content Tag omission None, both the starting and ending tag are mandatory. Permitted parent elementsAny element that accepts phrasing content, or any element that accepts flow content. DOM interfaceHTMLSpanElement (before HTML 5, the interface was HTMLElement Attributes This element only includes the global attributes. Example 1 <p><span>Some text</span></p>

<time>

The HTML <time> element represents either a time on a 24-hour clock or a precise date in the Gregorian calendar (with optional time and timezone information). This element is intended to be used presenting dates and times in a machine readable format. This can be helpful for user agents to offer any event scheduling for user's calendar. Usage note: This element is not appropriate for instances where a specific date cannot be calculated, nor should it be used for dates prior to the introduction to the Gregorian calendar (due to complications with calculating those dates). Content categoriesFlow content, phrasing content, palpable content. Permitted contentPhrasing content, but no descendant time elements. Tag omission None; both the starting and ending tags are mandatory. Permitted parent elements Any element that accepts phrasing content. DOM interfaceHTMLTimeElement Attributes Like all other HTML elements, this element supports the global attributes. datetime This attribute indicates the time and date of the element and must be a valid date with an optional time string. If the value cannot be parsed as a date with an optional time string, the element does not have an associated time stamp. Examples Simple example <p>The concert starts at <time>20:00</time>.</p> Above HTML will output: The concert starts at 20:00. datetime example <p>The concert took place on <time datetime="2001-05-15 19:00">May 15</time>.</p> Above HTML will output: The concert took place on May 15.

<nav>

The HTML Navigation Element (<nav>) represents a section of a page that links to other pages or to parts within the page: a section with navigation links. Usage notes: Not all links of a document must be in a <nav> element, which is intended only for major block of navigation links; typically the <footer> element often has a list of links that don't need to be in a <nav> element. A document may have several <nav> elements, for example, one for site navigation and one for intra-page navigation. User agents, such as screen readers targeting disabled users, can use this element to determine whether to omit the initial rendering of this content. Content categoriesFlow content, sectioning content, palpable content. Permitted contentFlow content. Tag omission None, both the starting and ending tag are mandatory. Permitted parent elements Any element that accepts flow content. DOM interfaceHTMLElement Attributes This element only includes the global attributes.

<section>

The HTML Section Element (<section>) represents a generic section of a document, i.e., a thematic grouping of content, typically with a heading. Each <section> should be identified, typically by including a heading (h1-h6 element) as a child of the <section> element. Usage notes : If it makes sense to separately syndicate the content of a <section> element, use an <article> element instead. Do not use the <section> element as a generic container; this is what <div> is for, especially when the sectioning is only for styling purposes. A rule of thumb is that a section should logically appear in the outline of a document. Content categoriesFlow content, Sectioning content, palpable content. Permitted contentFlow content. Tag omission None, both the starting and ending tag are mandatory. Permitted parent elements Any element that accepts flow content. Note that a <section> element must not be a descendant of an <address> element. DOM interfaceHTMLElement Attributes This element only includes the global attributes.

<s>

The HTML Strikethrough Element (<s>) renders text with a strikethrough, or a line through it. Use the <s> element to represent things that are no longer relevant or no longer accurate. However, <s> is not appropriate when indicating document edits; for that, use the <del> and <ins> elements, as appropriate. Content categoriesPhrasing content or flow content. Permitted contentTransparent. Tag omission None, both the starting and ending tag are mandatory. Permitted parent elements Any element that accepts phrasing content. DOM interfaceHTMLElement Attributes This element only includes the global attributes. DOM interface This element implements the HTMLElement interface. Implementation note: Up to Gecko 1.9.2 inclusive, Firefox implements the HTMLSpanElement interface for this element. Example <s>Today's Special: Salmon</s> SOLD OUT<br /> <span style="text-decoration:line-through;">Today's Special: Salmon</span> SOLD OUT Result Today's Special: Salmon SOLD OUT Today's Special: Salmon SOLD OUT

<strong>

The HTML Strong Element (<strong>) gives text strong importance, and is typically displayed in bold. Usage context Content categories Flow content, phrasing content Permitted content Phrasing content Tag omission None, must have both a start tag and an end tag Permitted parent elements Any element that accepts phrasing content, or any element that accepts flow content Normative document HTML5, section 4.6.3; HTML 4.01, section 9.2.1 Attributes This element only includes the global attributes.

<sub>

The HTML Subscript Element (<sub>) defines a span of text that should be displayed, for typographic reasons, lower, and often smaller, than the main span of text. Usage note: This element should be used for typographical reasons only, i.e. changing the position of the text changing its meaning like in mathematical (like t2, though the use of a MathML formula should be considered) or chemical formulas (like H2O). This element must not be used for styling purpose like the styling of the product name Latex. In that case CSS style should be used: the vertical-align property with the sub value will achieve the same effect. Usage context Content categories Flow content and phrasing content Permitted content Phrasing content Tag omission None as both the start and end tag are mandatory Permitted parent elements Any element that can contain phrasing content Normative document HTML5, section 4.6.14 (HTML4.01, section 9.2.3) Attributes This element only includes the global attributes.

<var>

The HTML Variable Element (<var>) represents a variable in a mathematical expression or a programming context. Usage Context Permitted content Phrasing content Tag omission Both start and end tags are required Permitted parent elements Any element that accepts phrasing content. Normative document HTML, "The var element" Attributes This element only includes the global attributes. DOM Interface This element implements the HTMLElement interface.

<aside>

The HTML element < aside> represents a section of the page with content connected tangentially to the rest , which could be considered separate from that content. These sections are often represented as sidebars or inserts. They often contain the definitions on the sidebars, such as definitions from the glossary ; there may also be other types of information , such as related advertisements ; the biography of the author ; web applications ; profile information or related links on the blog. Usage notes: Do not use the <aside> element to tag parenthesized text, as this kind of text is considered part of the main flow. Content categoriesFlow content, sectioning content, palpable content. Permitted contentFlow content. Tag omission None, both the starting and ending tag are mandatory. Permitted parent elements Any element that accepts flow content. Note that an <aside> element must not be a descendant of an <address> element. DOM interfaceHTMLElement Attributes This element only includes the global attributes.

<wbr>

The Word Break Opportunity (<wbr>) HTML element represents a position within text where the browser may optionally break a line, though its line-breaking rules would not otherwise create a break at that location. On UTF-8 encoded pages, <wbr> behaves like the U+200B ZERO-WIDTH SPACE code point. In particular, it behaves like a Unicode bidi BN code point, meaning it has no effect on bidi-ordering: <div dir=rtl>123,<wbr>456</div> displays, when not broken on two lines, 123,456 and not 456,123. For the same reason, the <wbr> element does not introduce a hyphen at the line break point. To make a hyphen appear only at the end of a line, use the soft hyphen character entity (&shy;) instead. This element was first implemented in Internet Explorer 5.5 and was officially defined in HTML5. Usage Context Permitted content Empty Tag omission It is an empty element; it must have a start tag, but must not have an end tag. Permitted parent elements Any element that accepts phrasing content. Normative document HTML 5, section 4.6.24 Attributes This element only includes the global attributes.

<details> Also what is the special attribute when it is open?

This is an experimental technology Because this technology's specification has not stabilized, check the compatibility table for the proper prefixes to use in various browsers. Also note that the syntax and behavior of an experimental technology is subject to change in future versions of browsers as the spec changes. Summary The HTML <details> Element is used as a disclosure widget from which the user can retrieve additional information. Content categoriesFlow content, sectioning root, interactive content, palpable content. Permitted content One <summary> element followed by flow content. Tag omission None, both the starting and ending tag are mandatory. Permitted parent elements Any element that accepts flow content. DOM interfaceHTMLDetailsElement Attributes This element includes the global attributes. open This Boolean attribute indicates whether the details will be shown to the user on page load. Default is false and so details will be hidden.

<dialog>

This is an experimental technology Because this technology's specification has not stabilized, check the compatibility table for the proper prefixes to use in various browsers. Also note that the syntax and behavior of an experimental technology is subject to change in future versions of browsers as the spec changes. Summary The HTML <dialog> element represents a dialog box or other interactive component, such as an inspector or window. <form> elements can be integrated within a dialog by specifying them with the attribute method="dialog". When such a form is submitted, the dialog is closed with a returnValue attribute set to the value of the submit button used. The ::backdrop CSS pseudo-element can be used to style behind a <dialog> element, for example to dim inaccessible content whilst a modal dialog is active. Content categoriesFlow content, sectioning root Permitted contentFlow content Tag omission None, both the starting and ending tag are mandatory. Permitted parent elements Any element that accepts flow content DOM interfaceHTMLDialogElement Attributes This element includes the global attributes. The tabindex attribute must not be used on the <dialog> element. open Indicates that the dialog is active and available for interaction. When the open attribute is not set, it shouldn't be shown to the user.

<menuitem>

This is an experimental technology Because this technology's specification has not stabilized, check the compatibility table for the proper prefixes to use in various browsers. Also note that the syntax and behavior of an experimental technology is subject to change in future versions of browsers as the spec changes. Summary The HTML <menuitem> element represents a command that a user is able to invoke through a popup menu. This includes context menus, as well as menus that might be attached to a menu button. A command can either be defined explicitly, with a textual label and optional icon to describe its appearance, or alternatively as an indirect command whose behavior is defined by a separate element. Commands can also optionally include a checkbox or be grouped to share radio buttons. (Menu items for indirect commands gain checkboxes or radio buttons when defined against elements <input type="checkbox"> and <input type="radio">.) Content categories None. Permitted content None, it is an empty element. Tag omission Must have a start tag and must not have an end tag. Permitted parent elements The <menu> element, where that element is in the popup menu state. (If specified, the type attribute of the <menu> element must be popup; if missing, the parent element of the <menu> must itself be a <menu> in the popup menu state.) DOM interfaceHTMLMenuItemElement Attributes This element includes the global attributes; in particular title can be used to describe the command, or provide usage hints. checked Boolean attribute which indicates whether the command is selected. May only be used when the type attribute is checkbox or radio. command Specifies the ID of a separate element, indicating a command to be invoked indirectly. May not be used within a menu item that also includes the attributes checked, disabled, icon, label, radiogroup or type. default This Boolean attribute indicates use of the same command as the menu's subject element (such as a button or input). disabled Boolean attribute which indicates that the command is not available in the current state. Note that disabled is distinct from hidden; the disabled attribute is appropriate in any context where a change in circumstances might render the command relevant. icon Image URL, used to provide a picture to represent the command. label The name of the command as shown to the user. Required when a command attribute is not present. radiogroup This attribute specifies the name of a group of commands to be toggled as radio buttons when selected. May only be used where the type attribute is radio. type This attribute indicates the kind of command, and can be one of three values. command: A regular command with an associated action. This is the missing value default. checkbox: Represents a command that can be toggled between two different states. radio: Represent one selection from a group of commands that can be toggled as radio buttons.

<summary>

This is an experimental technology Because this technology's specification has not stabilized, check the compatibility table for the proper prefixes to use in various browsers. Also note that the syntax and behavior of an experimental technology is subject to change in future versions of browsers as the spec changes. Summary The HTML summary element (<summary>) is used as a summary, caption or legend for the content of a <details> element. Note: If the <summary> element is omitted the heading "details" will be used. Usage context Permitted content Phrasing content Tag omission None, both the start tag and the end tag are mandatory. Permitted parent element The <details> element. Normative document HTML5, section 4.11.2 Attributes This element only includes the global attributes.

<br>

The HTML <br> Element (or HTML Line Break Element) produces a line break in text (carriage-return). It is useful for writing a poem or an address, where the division of lines is significant. Do not use <br> to increase the gap between lines of text; use the CSS margin property or the <p> element. Content categoriesFlow content, phrasing content. Permitted content None, it is an empty element. Tag omission Must have a start tag, and must not have an end tag. In XHTML documents, write this element as <br />. Permitted parent elements Any element that accepts phrasing content. DOM interfaceHTMLBRElement Attributes This element includes the global attributes.

<small>

The HTML Small Element (<small>) makes the text font size one size smaller (for example, from large to medium, or from small to x-small) down to the browser's minimum font size. In HTML5, this element is repurposed to represent side-comments and small print, including copyright and legal text, independent of its styled presentation. Usage context Content categories Flow content, phrasing content Permitted content Phrasing content Tag omission None, must have both a start tag and an end tag. Permitted parent elements Any element that accepts phrasing content, or any element that accepts flow content. Attributes This element only includes the global attributes.

<sup>

The HTML Superscript Element (<sup>) defines a span of text that should be displayed, for typographic reasons, higher, and often smaller, than the main span of text. Usage note: This element should be used for typographical reasons only, i.e. changing the position of the text changing its meaning like in mathematical (like f4, though the use of a MathML formula should be considered) or in French abbreviations (like Mlle, Mme or Cie). This element must not be used for styling purpose like the styling of the product name Latex. In that case CSS style should be used: the vertical-align property with the super value will achieve the same effect. Usage context Content categories Flow content and phrasing content Permitted content Phrasing content Tag omission None as both the start and end tag are mandatory Permitted parent elements Any element that can contain phrasing content Normative document HTML5, section 4.6.14 (HTML4.01, section 9.2.3) Attributes This element only includes the global attributes.


Ensembles d'études connexes

MS10: Introduction to Media Studies - Midterm 1

View Set

CIS Exam, Questions from quizzes

View Set

Accounting Exam 3 Multiple Choice

View Set

PDBIO 210 --Lesson 6 -- Appendicular Skeleton--Pelvic girdle, os coxae

View Set

MS PL-100 Individual Question Sets

View Set