Expand description
Attribute names for style (<style>) elements.
§Purpose
The <style> element contains CSS style information for the document,
allowing inline stylesheet definitions within HTML.
§Common Attributes
media: Media query for when the styles apply
§Example
<style>
body { font-family: sans-serif; }
.container { max-width: 1200px; margin: 0 auto; }
</style>
<style media="print">
body { font-size: 12pt; }
.no-print { display: none; }
</style>
<style media="(max-width: 600px)">
.mobile-hidden { display: none; }
</style>§WHATWG Specification
Constants§
- MEDIA
- The
mediaattribute.