...
" or "...
" ;Inline css style sheet is to write css code directly in existing HTML tags."/> ..." or "...
" ;Inline css style sheet is to write css code directly in existing HTML tags.">Home >Web Front-end >Front-end Q&A >What is the way to write inline css?
Inline css is written like "6461c6dfca0a6eeeab98debb3c9d2399...94b3e26ee717c64999d7867364b1b4a3" or "28048fa1d8f16de55ad187b3ba8e567a...94b3e26ee717c64999d7867364b1b4a3"; Inline CSS style sheet is to write CSS code directly in existing HTML tags.
The operating environment of this article: windows7 system, css3 version, Dell G3 computer.
What is the way to write inline css?
The inline css style sheet is to write the css code directly in the existing HTML tag, such as the following code:
<p style="color:red">这里文字是红色。</p>
Note that it should be written in the start tag of the element, as shown below The writing method is wrong:
<p>这里文字是红色。</p style="color:red">
and the css style code should be written in double quotes. If there are multiple css style code settings, they can be written together and separated by semicolons. The following code:
bb48c1a665e17caf93008ad3b3e0d707The text here is red. 94b3e26ee717c64999d7867364b1b4a3
Example:
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>认识html标签</title> <style type="text/css"> span{ color:red; } </style> </head> <body> <p style="color:blue">xx网,<span>超酷的互联网</span>、IT技术免费学习平台,创新的网络一站式学习、实践体验; <span>服务及时贴心</span>,内容专业、<span>有趣易学</span>。专注服务互联网工程师快速成为技术高手!</p> </body> </html>
(Learning video sharing: css video tutorial)
The above is the detailed content of What is the way to write inline css?. For more information, please follow other related articles on the PHP Chinese website!