HTML CSS Reference/HTML Tag Reference/label
Содержание
- 1 "label" CSS Attributes and JavaScript Style Properties
- 2 "label" Event Handlers
- 3 "label" Example
- 4 "label" HTML Attributes
- 5 "label" JavaScript Collections
- 6 "label" JavaScript Methods
- 7 "label" JavaScript Objects
- 8 "label" JavaScript Properties
- 9 "label" Microsoft Behaviors
- 10 "label" Microsoft Filters
- 11 "label" Syntax and Note
"label" CSS Attributes and JavaScript Style Properties
Names noted with an asterisk (*) are JavaScript properties only.
+----------------+--------------------------------------------------------------+
| CSS |!important accelerator |
| Attributes |background background-attachment |
| and |background-color background-image |
| JavaScript |background-position background-position-x |
| Style |background-positiony background-repeat |
| Properties |behavior border |
| |border-bottom border-bottom-color |
| |border-bottom-style border-bottom-width |
| |border-color border-left |
| |border-left-color border-left-style |
| |border-left-width border-right |
| |border-right-color border-right-style |
| |border-right-width border-style |
| |border-top border-top-color |
| |border-top-style border-top-width |
| |border-width bottom |
| |clear clip |
| |color cursor |
| |direction display |
| |filter float |
| |font font-family |
| |font-size font-style |
| |font-variant font-weight |
| |hasLayout(*) height |
| |layout-flow layout-grid |
| |layout-grid-mode left |
| |letter-spacing line-height |
| |margin margin-bottom |
| |margin-left margin-right |
| |margin-top overflow |
| |overflow-x overflow-y |
| |padding padding-bottom |
| |padding-left padding-right |
| |padding-top pixelBottom(*) |
| |pixelHeight(*) pixelLeft(*) |
| |pixelRight(*) pixelTop(*) |
| |pixelWidth(*) posBottom(*) |
| |posHeight(*) position |
| |posLeft(*) posRight(*) |
| |posTop(*) posWidth(*) |
| |right styleFloat(*) |
| |text-autospace text-decoration |
| |text-overflow text-transform |
| |text-underline-position textDecorationBlink(*) |
| |textDecorationLineThrough(*) textDecorationNone(*) |
| |textDecorationOverline(*) textDecorationUnderline(*) |
| |top unicode-bidi |
| |visibility white-space |
| |width word-spacing |
| |word-wrap writing-mode |
| |z-index zoom |
+----------------+--------------------------------------------------------------+
"label" Event Handlers
+----------------+--------------------------------------------------------------+
| Event |onActivate onAfterUpdate |
| Handlers |onBeforeActivate onBeforeCopy |
| |onBeforeCut onBeforeDeactivate |
| |onBeforeEditFocus onBeforePaste |
| |onBeforeUpdate onBlur |
| |onClick onContextMenu |
| |onControlSelect onCut |
| |onDblClick onDeactivate |
| |onDrag onDragEnd |
| |onDragEnter onDragLeave |
| |onDragOver onDragStart |
| |onDrop onErrorUpdate |
| |onFocus onFocusIn |
| |onFocusOut onHelp |
| |onKeyDown onKeyPress |
| |onKeyUp onLoseCapture |
| |onMouseDown onMouseEnter |
| |onMouseLeave onMouseMove |
| |onMouseOut onMouseOver |
| |onMouseUp onMouseWheel |
| |onMove onMoveEnd |
| |onMoveStart onPaste |
| |onPropertyChange onReadyStateChange |
| |onResize onResizeEnd |
| |onResizeStart onSelectStart |
+----------------+--------------------------------------------------------------+
"label" Example
<html>
<head>
<title>label element example</title>
</head>
<body">
<p>press Alt+A you will set focus on the text box.
<form>
<label for="tb" accesskey="a">
</label>
<input id="tb" type="text" value="textbox" size="20">
</form>
</p>
</body>
</html>
"label" HTML Attributes
+----------------+--------------------------------------------------------------+
| HTML |accesskey class |
| Attributes |contenteditable datafld |
| |dataformatas datasrc |
| |dir disabled |
| |for hidefocus |
| |id lang |
| |language style |
| |tabindex title |
| |unselectable |
+----------------+--------------------------------------------------------------+
"label" JavaScript Collections
+----------------+--------------------------------------------------------------+
| JavaScript |all attributes |
| Collections |behaviorUrns childNodes |
| |children |
+----------------+--------------------------------------------------------------+
"label" JavaScript Methods
+----------------+--------------------------------------------------------------+
| JavaScript |addBehavior appendChild |
| Methods |applyElement attachEvent |
| |blur clearAttributes |
| |click cloneNode |
| |componentFromPoint contains |
| |detachEvent dragDrop |
| |fireEvent focus |
| |getAdjacentText getAttribute |
| |getAttributeNode getBoundingClientRect |
| |getClientRects getElementsByTagName |
| |getExpression hasChildNodes |
| |insertAdjacentElement insertAdjacentHTML |
| |insertAdjacentText insertBefore |
| |mergeAttributes normalize |
| |releaseCapture removeAttribute |
| |removeAttributeNode removeBehavior |
| |removeChild removeExpression |
| |removeNode replaceAdjacentText |
| |replaceChild replaceNode |
| |scrollIntoView setActive |
| |setAttribute setAttributeNode |
| |setCapture setExpression |
| |swapNode |
+----------------+--------------------------------------------------------------+
"label" JavaScript Objects
+----------------+--------------------------------------------------------------+
| JavaScript |currentStyle runtimeStyle |
| Objects |style |
+----------------+--------------------------------------------------------------+
"label" JavaScript Properties
+----------------+--------------------------------------------------------------+
| JavaScript |accessKey canHaveChildren |
| Properties |canHaveHTML className |
| |clientHeight clientLeft |
| |clientTop clientWidth |
| |contentEditable cursor |
| |dataFld dataFormatAs |
| |datasrc dir |
| |disabled firstChild |
| |form hasLayout |
| |hideFocus htmlFor |
| |id innerHTML |
| |innerText isContentEditable |
| |isDisabled isMultiLine |
| |isTextEdit lang |
| |language lastChild |
| |nextSibling nodeName |
| |nodeType nodeValue |
| |offsetHeight offsetLeft |
| |offsetParent offsetTop |
| |offsetWidth outerHTML |
| |outerText ownerDocument |
| |parentElement parentNode |
| |parentTextEdit previousSibling |
| |readyState recordNumber |
| |scopeName scrollHeight |
| |scrollLeft scrollTop |
| |scrollWidth sourceIndex |
| |tabIndex tagName |
| |tagUrn title |
| |uniqueID |
+----------------+--------------------------------------------------------------+
"label" Microsoft Behaviors
+----------------+--------------------------------------------------------------+
| Microsoft |clientCaps download |
| Behaviors |homePage httpFolder |
| |saveFavorite saveHistory |
| |saveSnapshot userData |
+----------------+--------------------------------------------------------------+
"label" Microsoft Filters
+----------------+--------------------------------------------------------------+
| Microsoft |Alpha Barn |
| Filters |BasicImage BlendTrans |
| |Blinds Blur |
| |CheckerBoard Chroma |
| |Compositor DropShadow |
| |Emboss Engrave |
| |Fade FlipH |
| |FlipV Glow |
| |GradientWipe Gray |
| |ICMFilter Inset |
| |Invert Iris |
| |Light MaskFilter |
| |Matrix MotionBlur |
| |Pixelate RadialWipe |
| |RandomBars RandomDissolve |
| |RevealTrans Shadow |
| |Slide Spiral |
| |Stretch Strips |
| |Wave Wheel |
| |Xray Zigzag |
+----------------+--------------------------------------------------------------+
"label" Syntax and Note
Note:
This element creates a label and associates it with another element on the page.
The linked element must have the id attribute.
Pressing ALT and the access key will set the focus on the linked element
if it has the accesskey attribute of the <label>.
Syntax:
<label attributes events> . . . </label>