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

Definition

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

Example


<noscript>Text only visible when JavaScript is turned off or unavailable.</noscript>

Required Attributes

NONE

Optional Attributes

NONE

Common Attributes

class - specifies a classname for the element allowing you to apply the style of the predefined class to the content.


<noscript class="classname">Some text here</noscript>

id - specifies a unique id for the element allowing you to apply the style of the predefined id to the content.


<noscript id="idname">Some text here</noscript>

style - specifies an inline style for the element allowing you to apply the style to the content.


<noscript style="color:red;text-align:left">Some text here</noscript>

title - specifies extra information about the content.


<noscript title="information about the content">Some text here</noscript>

Language Attributes

dir - specifies 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>

lang - specifies a language code for the content of the element.


<noscript lang="en">Some text here</noscript>

xml:lang - specifies a language code for the content of the element in XHTML documents.


<noscript xml:lang="fr">Some text here</noscript>

Document Event Attributes

NONE

Form Event Attributes

NONE

Image Event Attributes

NONE

Keyboard Event Attributes

onkeydown - The JavaScript code to be run when an element is in focus and keyboard key is pressed.


<!-- Executes the go() function -->
<noscript onkeydown="go()">Some text here</noscript>

onkeypress - The JavaScript code to be run when an element is in focus and keyboard key is pressed down and released.


<!-- Executes the go() function -->
<noscript onkeypress="go()">Some text here</noscript>

onkeyup - The JavaScript code to be run when an element is in focus and keyboard key is released.


<!-- Executes the go() function -->
<noscript onkeyup="go()">Some text here</noscript>

Mouse Event Attributes

onclick - The JavaScript code to be run when a mouse is clicked on the element.


<!-- Executes the go() function -->
<noscript onclick="go()">Some text here</noscript>

ondblclick - The JavaScript code to be run when a mouse is double clicked on the element.


<!-- Executes the go() function -->
<noscript ondblclick="go()">Some text here</noscript>

onmousedown - The JavaScript code to be run when the mouse button is pressed down while the cursor is over the element.


<!-- Executes the go() function -->
<noscript onmousedown="go()">Some text here</noscript>

onmousemove - The JavaScript code to be run when the mouse button is moved.


<!-- Executes the go() function -->
<noscript onmousemove="go()">Some text here</noscript>

onmouseout - The JavaScript code to be run when the mouse cursor moves off an element.


<!-- Executes the go() function -->
<noscript onmouseout="go()">Some text here</noscript>

onmouseover - The JavaScript code to be run when the mouse cursor moves over an element.


<!-- Executes the go() function -->
<noscript onmouseover="go()">Some text here</noscript>

onmouseup - The JavaScript code to be run when the mouse button is released while the cursor is over the element.


<!-- Executes the go() function -->
<noscript onmouseup="go()">Some text here</noscript>

go to home page Homepage go to top of page Top