Html-attributes-reference

提供:Dev Guides
移動先:案内検索

HTML-属性リファレンス

すべてのHTMLタグに関連付けられている標準のHTML属性はほとんどありません。 これらの属性は、簡単な説明とともにここにリストされています。

グローバル属性

base、head、html、meta、param、script、style、およびtitle要素では無効です。

Attribute HTML-5 Description
accesskey Specifies a shortcut key for an element to be used in place of keyboard.
class The class of the element
contenteditable Yes Boolean attribute to specify whether the element is editable or not.
contextmenu Yes Specifies a context menu for an element.
data-* Yes Used to store custom data associated with the element.
draggable Yes Boolean attribute to specify whether the element can be dragged or not.
dropzone Yes Specifies whether the dragged data is copied, moved, or linked, when dropped.
hidden Yes Specifies whether element should be visible or not.
id   A unique id for the element
spellcheck Yes Specifies if the element must have it’s spelling or grammar checked.
style An inline style definition
tabindex Specifies the tab order of an element.
title   A text to display in a tool tip
translate Yes Boolean attribute specifies whether the content of an element should be translated or not

言語属性

*lang* 属性は、囲まれたコンテンツに使用されている言語を示します。 言語は、ISO標準言語の略語を使用して識別されます。たとえば、*フランス語*の *fr* 、*英語*の *en* などです。

RFC 1766(http://www.ietf.org/rfc/rfc1766.txt)は、これらのコードとその形式について説明しています。

base、br、frame、frameset、hr、iframe、param、およびscript要素では無効です。

Attribute Value Description
dir ltr rtl
Sets the text direction lang language_code