HTML Tag
Example:
Isolate the usernames from the surrounding text-direction settings:
- User hrefs: 60 points
- User jdoe: 80 points
- User إيان: 90 points
tag is currently supported only in Firefox and Chrome
Definitioen and Usage
bdi stands for Bi-directional Isolation
The bdi stands for Bi-directional Isolation
This elemen is useful when embedding user-generated content with an unknown directionality
This elemen is useful when embedding user-generated content with an unknown directionality
tag is new in HTML5
Global Attributes
tag also supports the Global Attributes in HTML
# HTML attributes give elements meaning and context
The global attributes below can be used on any HTML element.
| Attribute | Description |
|---|---|
| accesskey | Specifies a shortcut key to activate/focus an element |
| class | Specifies one or more classnames for an element (refers to a class in a style sheet) |
| contenteditableNew | Specifies whether the content of an element is editable or not |
| contextmenuNew | 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 |
| draggableNew | Specifies whether an element is draggable or not |
| dropzoneNew | Specifies whether the dragged data is copied, moved, or linked, when dropped |
| hiddenNew | Specifies that an element is not yet, or is no longer, relevant |
| id | Specifies a unique id for an element |
| lang | Specifies the language of the element's content |
| spellcheckNew | Specifies whether the element is to have its spelling and grammar checked or not |
| style | Specifies an inline CSS style for an element |
| tabindex | Specifies the tabbing order of an element |
| title | Specifies extra information about an element |
Event Attributes
# HTML 4 added the ability tolet event trigger actions in a browser, like starting a Java script when a user click on an element
| Attribute | Value | Description |
|---|---|---|
| onafterprintNew | script | Script to be run after the document is printed |
| onbeforeprintNew | script | Script to be run before the document is printed |
| onbeforeunloadNew | script | Script to be run before the document is unloaded |
| onerrorNew | script | Script to be run when an error occur |
| onhaschangeNew | script | Script to be run when the document has changed |
| onload | script | Fires after the page is finished loading |
| onmessageNew | script | Script to be run when the message is triggered |
| onofflineNew | script | Script to be run when the document goes offline |
| ononlineNew | script | Script to be run when the document comes online |
| onpagehideNew | script | Script to be run when the window is hidden |
| onpageshowNew | script | Script to be run when the window becomes visible |
| onpopstateNew | script | Script to be run when the window's history changes |
| onredoNew | script | Script to be run when the document performs a redo |
| onresizeNew | script | Fires when the browser window is resized |
| onstorageNew | script | Script to be run when a Web Storage area is updated |
| onundoNew | script | Script to be run when the document performs an undo |
| onunload | script | Fires once a page has unloaded (or the browser window has been closed) |
Form Events
Events triggered by actions inside a HTML form (applies to almost all HTML elements, but is most used in form elements):
| Attribute | Value | Description |
|---|---|---|
| onblur | script | Fires the moment that the element loses focus |
| onchange | script | Fires the moment when the value of the element is changed |
| oncontextmenuNew | script | Script to be run when a context menu is triggered |
| onfocus | script | Fires the moment when the element gets focus |
| onformchangeNew | script | Script to be run when a form changes |
| onforminputNew | script | Script to be run when a form gets user input |
| oninputNew | script | Script to be run when an element gets user input |
| oninvalidNew | script | Script to be run when an element is invalid |
| onreset | script | Fires when the Reset button in a form is clicked Not supported in HTML5 |
| onselect | script | Fires after some text has been selected in an element |
| onsubmit | script | Fires when a form is submitted |
Keyboard Events
| Attribute | Value | Description |
|---|---|---|
| onkeydown | script | Fires when a user is pressing a key |
| onkeypress | script | Fires when a user presses a key |
| onkeyup | script | Fires when a user releases a key |
Event triggered by a moused, or similar user actions:
Media Events
| Attribute | Value | Description |
|---|---|---|
| onclick | script | Fires on a mouse click on the element |
| ondblclick | script | Fires on a mouse double-click on the element |
| ondragNew | script | Script to be run when an element is dragged |
| ondragendNew | script | Script to be run at the end of a drag operation |
| ondragenterNew | script | Script to be run when an element has been dragged to a valid drop target |
| ondragleaveNew | script | Script to be run when an element leaves a valid drop target |
| ondragoverNew | script | Script to be run when an element is being dragged over a valid drop target |
| ondragstartNew | script | Script to be run at the start of a drag operation |
| ondropNew | script | Script to be run when dragged element is being dropped |
| onmousedown | script | Fires when a mouse button is pressed down on an element |
| onmousemove | script | Fires when the mouse pointer moves over an element |
| onmouseout | script | Fires when the mouse pointer moves out of an element |
| onmouseover | script | Fires when the mouse pointer moves over an element |
| onmouseup | script | Fires when a mouse button is released over an element |
| onmousewheelNew | script | Script to be run when the mouse wheel is being rotated |
| onscrollNew | script | Script to be run when an element's scrollbar is being scrolled |
Event triggered by medias like videos, image and audio (applies to all HTML elements but is most common in media elements, like
| Attribute | Value | Description |
|---|---|---|
| onabort | script | Script to be run on abort |
| oncanplayNew | script | Script to be run when a file is ready to start playing (when it has buffered enough to begin) |
| oncanplaythroughNew | script | Script to be run when a file can be played all the way to the end without pausing for buffering |
| ondurationchangeNew | script | Script to be run when the length of the media changes |
| onemptiedNew | script | Script to be run when something bad happens and the file is suddenly unavailable (like unexpectedly disconnects) |
| onendedNew | script | Script to be run when the media has reach the end (a useful event for messages like "thanks for listening") |
| onerrorNew | script | Script to be run when an error occurs when the file is being loaded |
| onloadeddataNew | script | Script to be run when media data is loaded |
| onloadedmetadataNew | script | Script to be run when meta data (like dimensions and duration) are loaded |
| onloadstartNew | script | Script to be run just as the file begins to load before anything is actually loaded |
| onpauseNew | script | Script to be run when the media is paused either by the user or programmatically |
| onplayNew | script | Script to be run when the media is ready to start playing |
| onplayingNew | script | Script to be run when the media actually has started playing |
| onprogressNew | script | Script to be run when the browser is in the process of getting the media data |
| onratechangeNew | script | Script to be run each time the playback rate changes (like when a user switches to a slow motion or fast forward mode) |
| onreadystatechangeNew | script | Script to be run each time the ready state changes (the ready state tracks the state of the media data) |
| onseekedNew | script | Script to be run when the seeking attribute is set to false indicating that seeking has ended |
| onseekingNew | script | Script to be run when the seeking attribute is set to true indicating that seeking is active |
| onstalledNew | script | Script to be run when the browser is unable to fetch the media data for whatever reason |
| onsuspendNew | script | Script to be run when fetching the media data is stopped before it is completely loaded for whatever reason |
| ontimeupdateNew | script | Script to be run when the playing position has changed (like when the user fast forwards to a different point in the media) |
| onvolumechangeNew | script | Script to be run each time the volume is changed which (includes setting the volume to "mute") |
| onwaitingNew | script | Script to be run when the media has paused but is expected to resume (like when the media pauses to buffer more data) |
Nama Kelompok:
1. Angga Wahyu Wibowo (A11.2010.05399)
2. Rohmatulloh M.I. (A11.2010.05406)
Pemrograman WEB Dasar
Kelompok A11.4511
Kelompok A11.4511
Tidak ada komentar:
Posting Komentar