A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/html/attributes/is below:

is · WebPlatform Docs

is Summary

Describes the base element from which the element with this attribute is extended.

Applies to dom/HTMLElement

Extending an element with [document.createElement](/w/index.php?title=dom/document/createElement&action=edit&redlink=1) creates a new element. To use that element in markup, you must describe the element with a tag and include the `is=` attribute with the value of the base element from which the new element is extended. See examples.

Examples

Markup for an extended element.

<button is="mega-button">

Creates the custom element 'mega-button’, which is extended from the ‘button’ element.

var megaButton = document.createElement('button', 'mega-button');

Usage
 The extended element name must contain at least one dash (-). So for example, <x-foo>, <foo-element>, and <my-foo-element> are valid names, while <tabs> and <foo_bar> are not.
Notes

The custom element name must not be one of the following existing hyphen-containing element names:

Related specifications
Custom Elements
Working draft
See also Related articles Web Components External resources

See Custom Elements on HTML5Rocks!.

Attributions

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4