rel — relationship between a document and a resource
The rel attribute specifies a resource relationship or how a link is processed. It accepts whitespace-separated keywords whose meaning and permitted use depend on the element.
CKTIS / HTML
Programming syntax, operators and concepts. Find an explanation, explore an example and return to learning.
The rel attribute specifies a resource relationship or how a link is processed. It accepts whitespace-separated keywords whose meaning and permitted use depend on the element.
The boolean `required` attribute requires a supported form control to be completed. It applies to `input`, `select`, and `textarea`; how the requirement is satisfied depends on the control type.
The boolean `reversed` attribute on `ol` enables descending numbering. It changes the numbering direction without reversing the order of the `li` elements.
The `role` attribute identifies an element’s semantic role for assistive technologies. It does not add appearance or behavior. Use it within ARIA in HTML rules, and prefer elements that already provide the appropriate native semantics.
The rows attribute specifies how many lines a textarea shows. It requires a positive integer; the default character height is 2 lines.
The rowspan attribute specifies how many table rows a td or th cell occupies. A value of 0 means the remaining rows of its group.
The sandbox attribute imposes additional restrictions on iframe content. An empty value enables the full restriction set, while allow-* tokens lift selected restrictions. Combining allow-scripts with allow-same-origin requires particular care.
The scope attribute on th identifies which cells a table header applies to: cells in a row, column, or corresponding group. It describes semantic relationships rather than appearance or cell merging.
The boolean selected attribute specifies an option element's default selection. It is not a reliable reading of the current choice: in JavaScript, selected describes the current state, while defaultSelected reflects the attribute.
The boolean shadowrootclonable attribute on a template element marks a declarative shadow root as clonable. Copying the host element can then include its shadow tree as well.
A boolean attribute on template that leaves a declarative shadow root without a custom element registry. It allows a registry to be assigned later through initialize(), rather than automatically using the document's registry.
The boolean shadowrootdelegatesfocus attribute on template enables focus delegation for a declaratively created shadow root. It allows focus to move from the host to a suitable internal element; it neither creates a shadow root by itself nor automatically focuses anything.
The shadowrootmode attribute on template lets the HTML parser create a declarative shadow root. Its open and closed values determine the access mode of that root.
The boolean shadowrootserializable attribute marks a declarative shadow root for serialization through getHTML({ serializableShadowRoots: true }). It does not automatically include that root in ordinary getHTML() output or the host's innerHTML.
The shadowrootslotassignment attribute on template selects how nodes are assigned to slots in a declarative shadow root: automatic named assignment or explicit manual assignment.
The shape attribute on area selects the geometry of an image-map region. The rect, circle, and poly values require coords; default covers the entire image.
The size attribute specifies the visible width of a text input in characters or the number of visible select options. It neither limits the value length nor enables multiple selection.
The sizes attribute has two distinct meanings: on img and source it describes the image width used to select a resource from srcset; on link it declares available icon dimensions. It does not replace CSS rules that determine the displayed image size.
The global slot attribute selects a named slot in Shadow DOM where an element is presented. Its value corresponds to the slot element's name value; the attribute and the element have different roles.
The span attribute specifies how many columns a col or colgroup represents. It accepts integers from 1 through 1000 and does not merge table cells.
The `spellcheck` attribute gives the browser a hint about whether editable text should receive spelling and grammar checking.
The `src` attribute specifies the URL of a resource used by an HTML element, such as an image, script, or recording. It is not a global attribute: its applicability, requirement, and loading behavior depend on the element.
The srcdoc attribute supplies an iframe document's HTML without a separate file and takes precedence over src.
The srclang attribute on track identifies the language of text track data using a BCP 47 language tag. It is required for subtitles, including when kind is omitted.