Handling the lack of JavaScript


The noscript element displays otherwise hidden content when a browser renders a page in an envoronment where JavaScript is disabled.


head {
noscript {
aside ^float:right {
h2 Deep Counter Unavailable
This page relies on JavaScript for certain features.
It appears that your browser is configured with
JavaScript turned off. In order to use the "deep counter"
you will need to enable JavaScript for this website.
script {
<!-- // recursively count an element's descendants
function deepCount(el) {
var x = 0;
for (let i=0; i < el.childen.length; i++) {
x += deepCount(el.childen[i]);
return x;
// -->
Placing a message on the page telling the user about unavailable functionality

semantax > scripting > noscriptHandling the lack of JavaScript