"; 2. In the style tag of the head part, write the style code with the syntax ""."/> "; 2. In the style tag of the head part, write the style code with the syntax "".">

Home  >  Article  >  Web Front-end  >  How to set style in html

How to set style in html

青灯夜游
青灯夜游Original
2021-05-17 12:05:1821167browse

htmlHow to set style: 1. Write the style directly in the style attribute of the element tag, with the syntax "439bbe99340dbb1b2203fd6659c74e1c"; 2. In the style tag of the head part , write the style code with the syntax "c9ccee2e6ea535a969eb3f532ad9fe89Style Code531ac245ce3e4fe3d50054a55f265927".

How to set style in html

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

htmlHow to set style

1. Use the HTML style attribute

in the tag Inside the beginning part,

<element style="样式的属性名1:样式的属性值1;属性名2:属性值2;......">

is included in the style attribute. For example:

<div style="color:red"></div>

2. Use the HTML c9ccee2e6ea535a969eb3f532ad9fe89 tag

to write it inside the HTML page. , stored in the head tag, and the style is written in the style tag.

<style>选择器 {属性名:属性值;属性名:属性值;......}</style>

Example:

<style>
  bdoy{font-size:14px;} 
</style>

For more programming-related knowledge, please visit: Programming Video! !

The above is the detailed content of How to set style in html. 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