Home  >  Article  >  Web Front-end  >  HTML style tag and related CSS

HTML style tag and related CSS

高洛峰
高洛峰Original
2017-02-24 11:02:291427browse

HTML style tag

style tag--use this tag when declaring styles in the document
The style tag appears in pairs, starting with c9ccee2e6ea535a969eb3f532ad9fe89 and ending with 531ac245ce3e4fe3d50054a55f265927
Attribute
media -- media type,

type -- the type containing the content, generally use type="text/css"
Example

<head>  
    <style type="text/css">  
    abbr   
    {   
        font-size: 12px;   
    }   
    .text10pxwhite   
    {   
        font-size: 10px;   
        color: #FFFFFF;   
    }   
    </style>  
</head>

Internal reference CSS -- Internal

You can use the style tag to directly load the content of the CSS file into the HTML document.

Example

<style type="text/css"><![CDATA[   
/* ----------文字样式开始---------- */  
  
/* 梦之都白色12象素文字 */  
.dreamduwhite12px  
{   
    color:white;   
    font-size:12px;   
}   
/* 梦之都黑色16象素文字 */  
.dreamdublack16px  
{   
    color:black;   
    font-size:16px;   
}   
  
/* ----------文字样式结束---------- */  
]]></style>


##Update For multiple HTML style tags and related CSS related articles, please pay attention to the PHP Chinese website!


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn