join: new@juude



get alerts for new articles






CLOSE WINDOW

join: new@juude



get alerts for new articles






CLOSE WINDOW
html5

Core Attributes


Not all attributes work in all browsers. And some do not work in any browser (March 2012)

Global

  • accesskey CHANGED
    A shortcut key to activate/focus an element

  • class: refers to the class in a style sheet an html element can have one or more class names

  • contenteditable NEW
    Specifies whether the content of an element is editable or not
    true | false
    Example:
    <span contenteditable="true">
    This text is editable - TRY IT
    </span>

  • contextmenu NEW
    Specifies a context menu for an element. The context menu appears when a user right-clicks on the element

  • dir Specifies the text direction for the content in an element. W3C lists this attribute as global but I can only get it to work within the bdo tag.
    ltr Default. Left-to-right text direction
    rtl Right-to-left text direction
    example
    <bdo dir="rtl">this he has a right-to-left text direction </bdo>

  • draggable NEW
    draggable="true" or "false"
    Specifies whether an element is draggable or not
    IE introduced this attribute with IE5
    Needs javaScript
    the elements within the tags <a> and<img> are draggabe by default

  • dropzone NEW
    dropzone="copy" or "move" or "link"
    Specifies whether the dragged data is copied, moved, or linked, when dropped
    Needs javaScript