The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Noscript tag implementation has changed

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #287445

    It used to be that a noscript tag was kept intact by browsers. One could even style it, even though I think that was against the specification when the tag was active (JS disabled) because it’s supposed to be a transparent element (if I get the meaning of that correctly).

    But now IE is the only browser still doing this. Firefox and Chrome replace the tag with a <span> and strip all of its attributes.

    Anybody else notice this? When did this first occur? There is literally not a single shred of information to be found about it.

    First of all, it doesn’t seem what the spec intended. Secondly, it totally changes the context of the children. Only few elements are allowed inside a span.

    The CSS I had added several years ago to position non-scripted elements stopped working…


    Thirdly, any CSS that was intended for other span elements could suddenly affect the noscript children.

    I don’t get this at all:

    Outside of head elements, if scripting is disabled for the noscript element the noscript element’s content model is transparent

    Outside of head elements, if scripting is enabled for the noscript element the noscript element must contain only text

    How? In regard to the latter. Should you empty the initial elements with JS? What’s the point…

    That’s a side track though. I doubt many care.


    If I’m not mistaken, that documentation says to either completely remove the noscript tag or at least treat it as non-existent. Not replace it with a span. I find it very odd.

    Edit – the quotes are likely just for browser developers, I would think. And the content be treated as text and not HTML elements. Makes little sense otherwise.


    I had the same issue a moment ago

    It just happened that I was testing it by desactiving javascript through the NoScript WebExtension
    but when I was desactiving javascript via the debugging console, the noscript would not change anymore in a span

    So if you’re using the NoScript WebExtension, it could be this.


    Thanks for sharing that, ManuMMM. A very interesting detail that I’ll have to look into further, since I changed all the layout to match the situation I encountered (indeed using NoScript). Which in turn might not work as expected when JS is disabled differently…

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.