<style> Tag Examples
Examples of the style
tag in HTML 5
<head> ... <style> ... </style> ... </head> <body> ... <div> <style scoped="scoped"> ... </style> <p>This paragraph has a specific style.</p> </div> ... </body>
Note that the scoped style element could not be put inside the p paragraph element because the content of the p element is phrasing content but the style element must be used in flow content.
Link to external style sheet
It is possible to link to an external style sheet using the <style> tag, although it's probably better to use <link rel="stylesheet"> instead.
<style type="text/css" media="screen"> @import url("/screen.css"); </style>
The slash at the beginning of the CSS url
string indicates that the style sheet is in the default location at the root of the web site's document tree.