Where to put the html style?

青灯夜游
Release: 2022-01-21 16:30:21
Original
13524 people have browsed it

In HTML, if style is an attribute, it needs to be placed in a single HTML element tag to set the inline style. The syntax is ""; if style is tag, it needs to be placed within the head tag to set inline styles.

Where to put the html style?

The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.

In HTML, there are two types of positioning of style:

  • style attribute

  • style tag

1. style attribute

The style attribute needs to be placed in a single HTML element tag to set the inline style

The style attribute will override Any global style settings, such as those specified in the