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 set up scheduled backup tasks in Linux centos

Implementation Preparation # Need to back up the ...

MySQL starts slow SQL and analyzes the causes

Step 1. Enable MySQL slow query Method 1: Modify ...

Comprehensive understanding of HTML basic structure

Introduction to HTML HyperText Markup Language: H...

Nginx compiled nginx - add new module

1. View existing modules /usr/local/nginx/sbin/ng...

Some questions about hyperlinks

<br />I am very happy to participate in this...

Tips for turning pixels into comprehensive brand experiences

Editor: This article discusses the role that inte...

React+Koa example of implementing file upload

Table of contents background Server Dependencies ...

Ubuntu 20.04 connects to wifi (2 methods)

I recently installed Ubuntu 20.04 and found that ...

Detailed explanation of Vue's custom event content distribution

1. This is a bit complicated to understand, I hop...

How to use jconsole to monitor remote Tomcat services

What is JConsole JConsole was introduced in Java ...

Key issues and solutions for web page access speed

<br /> The website access speed can directly...

A brief discussion on how to learn JS step by step

Table of contents Overview 1. Clearly understand ...

Vue monitoring properties and calculated properties

Table of contents 1. watch monitoring properties ...

Detailed explanation of vite2.0 configuration learning (typescript version)

introduce You Yuxi’s original words. vite is simi...

How to generate Hive table creation statement comment script in MySQL metadata

Preface This article mainly introduces the releva...