Home > Web Front-end > HTML Tutorial > How to use html div tag

How to use html div tag

silencement
Release: 2019-05-27 10:25:30
Original
4260 people have browsed it

How to use html div tag

HTML 5

tag

Definition and usage

tag definition in HTML document Division or section. The

tag is often used to group block-level elements so that they can be formatted through a style sheet.

Example

<div style="color:#00FF00">
  <h3>This is a header</h3>
  <p>This is a paragraph.</p></div>
Copy after login

Browser support

All major browsers support

Differences between HTML 4.01 and HTML 5

The "align" attribute was deprecated in HTML 4.01 and is not supported in HTML 5.

Tips and Notes

Note: Browsers typically insert line breaks before and after div elements.

Tip: The

tag is often used to group block-level elements so that they can be formatted using styles.

Global attributes

The

tag supports global attributes in HTML 5.

Event Attributes

The

tag supports event attributes in HTML 5.

The above is the detailed content of How to use html div tag. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template