I am reading and taking notes on the HTML specifications for 100 days as part of #The100DayProject. Read the initial intent/backstory. I am a Microsoft employee but all opinions, comments, etc on this site are my own. I do not speak on behalf of my employer, and thus no comments should be taken as representative of Microsoft’s official opinion of the spec. Subsections not listed below were read without comment.
Currently reading in 4.2.6 The style element. UA = user agent = browsers and other applications that process HTML documents.
For embedding CSS—well, styles in general, CSS implementation is not actually required by the spec—directly into a document (as opposed to linking to stylesheets or stuffing styles in an element’s
Attributes on the
type: The default value is
"text/css". An unknown value in
typeshould be ignored by the UA as if it’s unsupported.
media: tells what types of media the styles apply to.
title: sets alternate style sheet sets. This attribute doesn’t inherit from ancestors.
- You shouldn’t set
style element’s descendants and subresources get processed before
style itself. I suppose that’s something like an
@import rule. Note: time spent fetching “critical subresources” blocks page load.