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

Time:05-14

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?

CodePudding user response:

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

CodePudding user response:

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.

  • Related