Search code examples
htmlw3c

W3C - ID Tag for <style>


is this allowed?

<style id="my_id_0" type="text/css"> ...

Solution

  • It depends which markup language you are using.

    • It is not allowed in HTML 4.01.
    • It is allowed in XHTML 1.0 (this looks like one of many changes that the working group decided to implement without a mention in the differences from HTML 4.01 section)
    • It is allowed in the HTML 5 draft