can you apply media queries in the <noscript/> tag

109 views Asked by At

Hey so im trying to display a message to the user if javascript is disabled using the noscript html tag. the message simply just asks them to re-enable javascript in their browser settings.

however i want to also include a media query so that the message is responsive with the width and height of the screen. i want to know is it possible to use media querys when javascript is disabled or are media queries reliant on javascript?

2

There are 2 answers

0
Mujeeb Shaikh On

No, Media queries are not dependent on JavaScript. You can use media query as you wish in stylesheet or tag (External/Internal).

0
ToxicFlame427 On

Media queries can only be applied in CSS, since they are not mainly based with JavaScript. You would have to use the <style></style> tags for this.