DEV Community

Cover image for Enable a better experience with noscript HTML element!
Jordan Finneran
Jordan Finneran

Posted on • Edited on • Originally published at jordanfinners.dev

2

Enable a better experience with noscript HTML element!

Contents

  1. Intro
  2. noscript
  3. Example
  4. Summary

Intro

If you run your website with Scripting turned off (JavaScript disabled for example), what do you get? I'd be really interested to see screenshots in comments.

If your site relies upon JavaScript you might not get anything. Now there is a really nice element to provide a better experience to your users if this is the case - introducing noscript

noscript

You can provide those users without scripting a better experience and include custom messaging for them using the noscript element.
This will only be displayed when a script type is unsupported on the page or scripting is turned off.

Example

Shut up and show me the code.

<noscript>
    <p>JavaScript is required to run this page, please enable it by doing X, Y, Z.</p>
</noscript>
Enter fullscreen mode Exit fullscreen mode

Summary

In summary, you can use what browsers give you to create a better experience for those users without scripting!
Even if it is to tell them what to do, to get the real experience.

Element reference can be found here.

Happy building!

Let me know what your sites look like without scripting on!

Quickstart image

Django MongoDB Backend Quickstart! A Step-by-Step Tutorial

Get up and running with the new Django MongoDB Backend Python library! This tutorial covers creating a Django application, connecting it to MongoDB Atlas, performing CRUD operations, and configuring the Django admin for MongoDB.

Watch full video →

Top comments (0)

Jetbrains image

Is Your CI/CD Server a Prime Target for Attack?

57% of organizations have suffered from a security incident related to DevOps toolchain exposures. It makes sense—CI/CD servers have access to source code, a highly valuable asset. Is yours secure? Check out nine practical tips to protect your CI/CD.

Learn more

👋 Kindness is contagious

Dive into this thoughtful article, cherished within the supportive DEV Community. Coders of every background are encouraged to share and grow our collective expertise.

A genuine "thank you" can brighten someone’s day—drop your appreciation in the comments below!

On DEV, sharing knowledge smooths our journey and strengthens our community bonds. Found value here? A quick thank you to the author makes a big difference.

Okay