When doing HTML page development, we all use CSS styles, CSS styles have three applications, let’s look at it.

  1. The first way is to use the link tag to reference the style file.

     

    The style definition of the style file is the same as the other way around, just write the formal style code.

     

    The second way is to write the style tag directly in the HEAD section of the HTML page, and then write the style code in the tag.

     

    The third way is to write style directly in the HTML element, and write style code directly in the style.

     

    Of the three methods, the style written directly in the style is the highest priority, for example, also set the width, the width in the style is applied first.

     

    To sum up:

    1. The first introduces style files directly.

    2. Second, add the style tag to the head to write the style file.

    3. Write style code directly in HTML elements.

    The highest priority is style.