HTML <noscript> tagS2C Home   « HTML <noscript> tag

Definition

The <noscript> tag allows us to do non script based rendering when JavaScript is disabled or not supported by the browser.

Example


  <noscript>
    <p>JavaScript disabled. A lot of the features of the site won't work.</p> 
    <p>Find out how to turn on JavaScript <a href="http://htmldoctor.info/pages/scripton.html"><b>HERE</b></a>.</p>
  </noscript>

Attributes

The following attributes can be used with the <noscript> tag.


<noscript> Specific Attributes
Attribute Value Description Example
There are no required or optional attributes specific to the <noscript> tag.
<noscript> Global Attributes
Attribute Description Example
Common
classSpecifies a classname for the element allowing you to apply the style of the predefined class to the content.

<noscript class="name">Some text here</noscript>
idSpecifies a unique id for the element allowing you to apply the style of the predefined id to the content.

<noscript id="name">Some text here</noscript>
styleSpecifies an inline style for the element allowing you to apply the style to the contentt.

<noscript style="color:red;">Some text here</noscript>
titleSpecifies an inline style for the element allowing you to apply the style to the content.

<noscript title="Content info">Some text here</noscript>
Keyboard
accesskeySpecifies a keyboard shortcut to associate with the element.

<noscript accesskey="a">Some text here</noscript>
tabindexSpecifies a tab order for the element.

<noscript tabindex="1">Some text here</noscript>
Language
dirSpecifies the directional flow of the content.

<!-- The text will flow from left to right -->
<noscript dir="ltr">Some text here</noscript>
<!-- The text will flow from right to left -->
<noscript dir="rtl">Some text here</noscript>
langSpecifies a language code for the content of the element.

<noscript lang="en">Some text here</noscript>
spellcheckSpecifies an inline style for the element allowing you to apply the style to the contentt.

<!-- Valid values true and false. -->
<!-- Default inherited / browser specific. -->
<noscript spellcheck="true">Some text here</noscript> 
translateSpecifies an inline style for the element allowing you to apply the style to the content.

<!-- Valid values yes and no. -->
<!-- Default yes. -->
<noscript translate="no">Some text here</noscript> 
Miscellaneous
contenteditableSpecifies whether the content of the element is editable.

<!-- Valid values true and false. -->
<!-- Default inherited. -->
<noscript contenteditable="true">Some text here</noscript> 
draggableSpecifies whether the element is draggable.

<!-- Valid values true and false. -->
<!-- Default browser specific. -->
<noscript draggable="true">Some text here</noscript>
hiddenSpecifies whether the element is not yet, or no longer, relevant.

<!-- Valid values an empty string or hidden -->
<noscript hidden>Some text here</noscript> 
<noscript hidden="hidden">Some text here</noscript> 
<noscript> Event Attributes
Attribute Description Example
Document Element
oncopyThe script to be run when the user copies the content of an element.

 <!-- Executes go() function -->
<noscript oncopy="go()">Some text here</noscript> 
oncutThe script to be run when the user cuts the content of an element.

 <!-- Executes go() function -->
<noscript oncut="go()">Some text here</noscript>
onpasteThe script to be run when the user pastes some content into an element.

 <!-- Executes go() function -->
<noscript onpaste="go()">Some text here</noscript>
Drag and Drop
ondragThe script to be run when an element is dragged.

 <!-- Executes go() function -->
<noscript ondrag="go()">Some text here</noscript>
ondragendThe script to be run when an element has stopped being dragged.

 <!-- Executes go() function -->
<noscript ondragend="go()">Some text here</noscript>
ondragenterThe script to be run when an element has been dragged to a valid drop target.

 <!-- Executes go() function -->
<noscript ondragenter="go()">Some text here</noscript>
ondragleaveThe script to be run when an element leaves a valid drop target.

 <!-- Executes go() function -->
<noscript ondragleave="go()">Some text here</noscript>
ondragoverThe script to be run when an element is being dragged over a valid drop target.

 <!-- Executes go() function -->
<noscript ondragover="go()">Some text here</noscript>
ondragstartThe script to be run at the start of a drag operation.

 <!-- Executes go() function -->
<noscript ondragstart="go()">Some text here</noscript>
ondropThe script to be run when a dragged element is being dropped.

 <!-- Executes go() function -->
<noscript ondrop="go()">Some text here</noscript>
Form
onblurThe script to be run when the element loses focus.

 <!-- Executes go() function -->
<noscript onblur="go()">Some text here</noscript>
onchangeThe script to be run when object changed and attempt to leave field.

 <!-- Executes go() function -->
<noscript onchange="go()">Some text here</noscript>
oncontextmenuThe script to be run when a context menu is triggered.

 <!-- Executes go() function -->
<noscript oncontextmenu="go()">Some text here</noscript>
onfocusThe script to be run when the element gets focus.

 <!-- Executes go() function -->
<noscript onfocus="go()">Some text here</noscript>
oninputThe script to be run when an element gets user input.

 <!-- Executes go() function -->
<noscript oninput="go()">Some text here</noscript>
oninvalidThe script to be run when an element is invalid.

 <!-- Executes go() function -->
<noscript oninvalid="go()">Some text here</noscript>
onresetThe script to be run when a dragged element is being dropped.

 <!-- Executes go() function -->
<noscript onreset="go()">Some text here</noscript>
onselectThe script to be run when some or all of the contents of an object are selected.

 <!-- Executes go() function -->
<noscript onselect="go()">Some text here</noscript>
onsubmitThe script to be run when a form is submitted.

 <!-- Executes go() function -->
<noscript onsubmit="go()">Some text here</noscript>
Keyboard
onkeydownThe script to be run when an element is in focus and keyboard key is pressed down.

 <!-- Executes go() function -->
<noscript onkeydown="go()">Some text here</noscript>
onkeypressThe script to be run when an element is in focus and keyboard key is pressed down and released.

 <!-- Executes go() function -->
<noscript onkeypress="go()">Some text here</noscript>
onkeyupThe script to be run when an element is in focus and keyboard key is released.

 <!-- Executes go() function -->
<noscript onkeyup="go()">Some text here</noscript>
Media
onabortThe script code to be run on abort.

 <!-- Executes go() function -->
<noscript onabort="go()">Some text here</noscript>
oncanplayThe script to be run when a file has buffered enough so it is ready to start playing.

 <!-- Executes go() function -->
<noscript oncanplay="go()">Some text here</noscript>
oncanplaythroughThe script to be run when a file can be played all the way to the end without further need of buffering.

 <!-- Executes go() function -->
<noscript oncanplaythrough="go()">Some text here</noscript>
oncuechangeThe script to be run when the cue changes when using the track element.

 <!-- Executes go() function -->
<noscript oncuechange="go()">Some text here</noscript>
ondurationchangeThe script to be run when the length of the media is changed.

 <!-- Executes go() function -->
<noscript ondurationchange="go()">Some text here</noscript>
onemptiedThe script to be run when a media resource element suddenly becomes empty, usually due to an error.

 <!-- Executes go() function -->
<noscript onemptied="go()">Some text here</noscript>
onendedThe script to be run when the media has reach the end.

 <!-- Executes go() function -->
<noscript onended="go()">Some text here</noscript>
onloadeddataThe script to be run when media data is loaded and playback can start.

 <!-- Executes go() function -->
<noscript onloadeddata="go()">Some text here</noscript>
onloadedmetadataThe script to be run when metadata has been loaded.

 <!-- Executes go() function -->
<noscript onloadedmetadata="go()">Some text here</noscript>
onloadstartThe script to be run whenthe media resource has started loading.

 <!-- Executes go() function -->
<noscript onloadstart="go()">Some text here</noscript>
onpauseThe script to be run when the media resource has been paused.

 <!-- Executes go() function -->
<noscript onpause="go()">Some text here</noscript>
onplayThe script to be run when the media resource starts playback.

 <!-- Executes go() function -->
<noscript onplay="go()">Some text here</noscript>
onplayingThe script to be run when when playback has already begun.

 <!-- Executes go() function -->
<noscript onplaying="go()">Some text here</noscript>
onprogressThe script to be run when the browser is fetching the media data.

 <!-- Executes go() function -->
<noscript onprogress="go()">Some text here</noscript>
onratechangeThe script to be run when the playback rate changes.

 <!-- Executes go() function -->
<noscript onratechange="go()">Some text here</noscript>
onseekedThe script to be run when the seeking attribute is set to false indicating that seeking has finished.

 <!-- Executes go() function -->
<noscript onseeked="go()">Some text here</noscript>
onseekingThe script to be run when the seeking attribute is set to true indicating that seeking is currently active.

 <!-- Executes go() function -->
<noscript onseeking="go()">Some text here</noscript>
onstalledThe script to be run when the browser is unable to continue fetching media data.

 <!-- Executes go() function -->
<noscript onstalled="go()">Some text here</noscript>
onsuspendThe script to be run when media data has stopped before being completely loaded.

 <!-- Executes go() function -->
<noscript onsuspend="go()">Some text here</noscript>
ontimeupdateThe script to be run when the media resources current playback position has changed.

 <!-- Executes go() function -->
<noscript ontimeupdate="go()">Some text here</noscript>
onvolumechangeThe script to be run when the volume has changed or been muted.

 <!-- Executes go() function -->
<noscript onvolumechange="go()">Some text here</noscript>
onwaitingThe script to be run when the media resource has paused but is expected to resume.

 <!-- Executes go() function -->
<noscript onwaiting="go()">Some text here</noscript>
Mouse
onclickThe script to be run when when a mouse is clicked on an element.

 <!-- Executes go() function -->
<noscript onclick="go()">Some text here</noscript>
ondblclickThe script to be run when a mouse is double clicked on an element.

 <!-- Executes go() function -->
<noscript ondblclick="go()">Some text here</noscript>
onmousedownThe script to be run when he mouse button is pressed down while the cursor is over an element.

 <!-- Executes go() function -->
<noscript onmousedown="go()">Some text here</noscript>
onmousemoveThe script to be run when the mouse button is moved.

 <!-- Executes go() function -->
<noscript onmousemove="go()">Some text here</noscript>
onmouseoutThe script to be run when the mouse cursor moves off an element.

 <!-- Executes go() function -->
<noscript onmouseout="go()">Some text here</noscript>
onmouseoverThe script to be run when the mouse cursor moves over an element.

 <!-- Executes go() function -->
<noscript onmouseover="go()">Some text here</noscript>
onmouseupThe script to be run when the mouse button is released while the cursor is over the element.

 <!-- Executes go() function -->
<noscript onmouseup="go()">Some text here</noscript>
onwheelThe script to be run when the mouse wheel rolls up or down over an element.

 <!-- Executes go() function -->
<noscript onwheel="go()">Some text here</noscript>
Scroll
onscrollThe script code to be run when the scrollbar of an element is being scrolled.

 <!-- Executes go() function -->
<noscript onscroll="go()">Some text here</noscript> 
Window - NONE

Relevant HTML Tutorials

HTML Advanced - Scripting