Detailed explanation of HTML style tags and related CSS references

Detailed explanation of HTML style tags and related CSS references

HTML style tag

style tag - Use this tag when declaring styles in a document
Style tags appear in pairs, starting with <style> and ending with </style>
media -- media type,

type -- contains the type of content, usually type="text/css"
Example

XML/HTML CodeCopy content to clipboard
  1. < head >   
  2.      < style   type = "text/css" >   
  3. abbr
  4. {
  5. font-size: 12px;
  6. }
  7. .text10pxwhite
  8. {
  9. font-size: 10px;
  10. color: #FFFFFF;
  11. }
  12.      </ style >   
  13. </ head >   

Internal CSS

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

Example

CSS CodeCopy content to clipboard
  1. <style type= "text/css" ><![CDATA[
  2. /* ----------Beginning of text style---------- */   
  3.   
  4. /* Dream City white 12 pixel text */   
  5. .dreamduwhite 12px   
  6. {
  7.      color : white ;
  8.      font-size : 12px ;
  9. }
  10. /* Dream City black 16 pixel text */   
  11. .dreamdublack 16px   
  12. {
  13.      color : black ;
  14.      font-size : 16px ;
  15. }
  16.   
  17. /* ----------End of text style---------- */   
  18. ]]></style>

<<:  Solution to Mysql binlog log file being too large

>>:  Discussion on image path issues in css (same package/different package)

Recommend

How to add Lua module to Nginx

Install lua wget http://luajit.org/download/LuaJI...

In-depth explanation of MySQL isolation level and locking mechanism

Table of contents Brief description: 1. Four char...

Steps to set up Windows Server 2016 AD server (picture and text)

Introduction: AD is the abbreviation of Active Di...

What are the differences between sql and mysql

What is SQL? SQL is a language used to operate da...

How to elegantly back up MySQL account information

Preface: I recently encountered the problem of in...

Detailed explanation of the mechanism and implementation of accept lock in Nginx

Preface nginx uses a multi-process model. When a ...

How to create a file system in a Linux partition or logical volume

Preface Learn to create a file system on your sys...

Teach you how to write maintainable JS code

Table of contents What is maintainable code? Code...

How to use Vue3 mixin

Table of contents 1. How to use mixin? 2. Notes o...

How to use vuex in Vue project

Table of contents What is Vuex? Vuex usage cycle ...

Optimized implementation of count() for large MySQL tables

The following is my judgment based on the data st...

How to mount a disk in Linux

When using a virtual machine, you may find that t...

Detailed explanation of destructuring assignment syntax in Javascript

Preface The "destructuring assignment syntax...