Home  >  Article  >  Web Front-end  >  What is the tag of style?

What is the tag of style?

云罗郡主
云罗郡主Original
2019-02-18 11:18:4013004browse

The style tag is used to define style information for HTML documents. The style tag can be an element in the head part, such as: link and style, etc. The type attribute is required and defines the content of the style element.

html style tag syntax

Function: used to define style information for HTML documents.

Note: In style, you can specify how the HTML document is rendered in the browser. The type attribute is required and defines the content of the style element. The only possible value is "text/css". The style element is located in the head section.

Note: To link to an external style sheet, please use the 2cdf5bf648cf2f33323966d7f58a7f3f tag.

html style tag example

<html>
<head>
<style type="text/css">
h1 {color: red}
p {color: blue}
</style>
</head>
<body>
<h1>header 1</h1>
<p>A paragraph.</p>
</body>
</html>


The above is the detailed content of What is the tag of style?. 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