"; 2. Internal style, the syntax is "element name {attribute: attribute value;} "; 3. External style, syntax ""."/> "; 2. Internal style, the syntax is "element name {attribute: attribute value;} "; 3. External style, syntax "".">

Home  >  Article  >  Web Front-end  >  What are the three common ways to write css?

What are the three common ways to write css?

醉折花枝作酒筹
醉折花枝作酒筹Original
2021-07-26 10:17:255938browse

Three commonly used writing methods are: 1. Inline style, syntax "4adb5434f3dcc7d3a3e661b6bafd4ce876060b6afd499baec3489b0d989a3cb0"; 2. Internal style, syntax "Element name {attribute: attribute value;}"; 3. External style, syntax "6f3a7500fd6a8a89174a45768ec4022f".

What are the three common ways to write css?

CSS

1.How to use CSS (inline style, internal style, external style)--inline style

    Syntax:

         3b737bc99eabd1e0f051b0d4d2060fd276060b6afd499baec3489b0d989a3cb0

2.CSS How to use - internal style

  <head>

  <style>

      p{

      width:100px;
      
      }
  </style>
  </head>

3. How to use CSS - external style

Define the style in external files with the .css suffix, and then reference these files on the page

 09c27bebd2f30843186a6ed5b54e617d

Extended information:

Hyperlink

<a>内容</a>

Note: Only after the href attribute is set, the hyperlink is allowed to be clicked

Attribute:

href=""

General usage:

href="Complete URL"

Special usage:

href="#" Return to top

href="Path to compressed package file" Download this file

href="javascript:js code" Execute this js code

Anchor point

  • Mark the place you want to jump to

    • 0b0c662d88aa1981dd81ef7a5d762055e702308a6937582591eb19792cbdbd02

  • Jump

    • 608c3021eadfb13747bc3acf322238d5Jump5db79b134e9f6b82c0b36e0489ee08ed

##Recommended learning:

css video tutorial

The above is the detailed content of What are the three common ways to write css?. For more information, please follow other related articles on 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