embedded style code"; 2. Used to specify the inline style of the element. This attribute will override any Global style setting, the syntax is " "."/> embedded style code"; 2. Used to specify the inline style of the element. This attribute will override any Global style setting, the syntax is " ".">

Home>Article>Web Front-end> What is the usage of style in html5

What is the usage of style in html5

WBOY
WBOY Original
2022-03-25 15:21:39 6853browse

Usage: 1. Used to specify the embedded style of html documents, the syntax is ""; 2. Used to specify Element inline style, this attribute will override any global style settings, the syntax is " ".

What is the usage of style in html5

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

What is the usage of style in html5

1. Used to define style information for HTML documents

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.

The attribute type value is text/css and specifies the MIME type of the style sheet.

The example is as follows:

   

header 1

A paragraph.

Output result:

What is the usage of style in html5

2. Used to specify the inline style of elements

The style attribute specifies the inline style of the element. The style attribute will override any global style settings, such as those specified in the

Syntax

style_definition One or more CSS properties and values separated by semicolons.

The example is as follows:

  

This is a header

This is a paragraph.


Output result:

##Recommended tutorial: "What is the usage of style in html5html video tutorial

The above is the detailed content of What is the usage of style in html5. 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
Previous article:What are webgl and css3 Next article:What are webgl and css3