style
Used to define CSS at a page-level (as opposed to an external CSS file). A style element must appear inside the head element.
Required Attributes
- type is used to specify the content type which is generally text/css.
Optional Attributes
- media can be used to specify which media the styles are associated to. A value such as screen, print, projection, braille, speech or all can be used or a combination in a comma-separated list.
- title can be used to assign a title to the styles within the element. This can be then be referenced by browsers or scripting languages to either disable the styles or switch between alternate style sheets.
Example
<style type="text/css">
body {
color: red;
background-color: yellow;
font-size: 80%;
}
p {
line-height: 1.5em;
}
</style>
No comments:
Post a Comment