DEV Community

Discussion on: Important HTML tags (part 2) 💻🖥🖱

Collapse
 
aminnairi profile image
Amin

Hi John and thanks for your article.

Just to add more information about the <noscript> tag, it can be styled from an external stylesheet or just a <style> tag in the <head> one.

<!DOCTYPE html>
<html>
  <head>
    <style>
      noscript > h1 {
        text-align: center;
        font-family: sans-serif;
        color: lightgrey;
      }
      noscript > p {
        text-align: center;
        font-family: monospace;
        color: black;
      }
    </style>
  </head>
  <body>
    <noscript>
      <h1>Styled</h1>
      <p>Also styled, with more text.</p>
    </noscript>
  </body>
</html>
Enter fullscreen mode Exit fullscreen mode

Adding the noscript selector to prevent clashing with other tags is also a good practice in this case.

This tag is often used and added by default when using frameworks like Vue, Angular and React since they heavily rely on the JavaScript engine being enabled in the browser.

Collapse
 
devcodesguy profile image
Devcodesguy

Indeed, I almost forgot about this!

Thanks, Amin!