Forums - C# Corner

Forum guidelines
Sam Hobbs

Sam Hobbs

  • 31
  • 29.5k
  • 1.3m

Where CSS can exist physically in a HTML file

Mar 22 2016 5:18 PM
I am learning CSS. I am having difficulty understanding it conceptually. I have a question about where CSS can exist physically in a HTML file. I think the following are the (at least the common)
uses of CSS in terms of where it can exist in the body.
  • Explicit use of styles as "class" and "id" attributes in elements
  • Inline style using the "style" attribute in elements
  • Style tags (in the body)
I know that style tags in the body is not common and that in the body HTML 5 only supports style tags with the scoped attribute.
 
I know that type selectors in CSS within style tags in the header can affect the specified element(s) logically but I am only asking about physical presence within the body.
 
Does that list specify (generally) everywhere that CSS can exist physically in a HTML file?
 
 

Answers (5)