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

HTML style tag and related CSS

高洛峰
Release: 2017-02-24 11:02:29
Original
1474 people have browsed it

HTML style tag

style tag--use this tag when declaring styles in the document
The style tag appears in pairs, starting with
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>
Copy after login

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>
Copy after login


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


Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template