English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
HTML block is a box that stores tags and groups them.
HTML can group elements using <div> and <span>.
<div> <strong>Home</strong>Appreciate</em>Feedback</em></div><!-- Content --><div> em>HTML basic tutorial<3codebox.com</em>CSS tutorial</em>JavaScript tutorial</em></div>Test to see ‹/›
Most HTML elements are defined as block-level elements or inline elements.
Block-level elements usually start on a new line when displayed in the browser (and end).
Examples: <h1, <p>, <ul>, <table>
Inline elements usually do not start on a new line when displayed.
Examples: <b>, <td>, <a>, <img> <i>
The HTML <div> element is a block-level element and can be used as a container for other HTML elements.
The <div> element has no specific meaning. In addition, since it is a block-level element, the browser will display a line break before and after it.
If used with CSS, the <div> element can be used to set style properties for large content blocks.
Another common use of the <div> element is document layout. It replaces the outdated method of using tables to define layout. Using the <table> element for document layout is not the correct use of tables. The purpose of the <table> element is to display tabular data.
The HTML <span> element is an inline element and can be used as a container for text.
The <span> element has no specific meaning.
When used with CSS, the <span> element can be used to set style properties for part of the text.
Tag | Description |
<div> | Définit la zone du document, élément en bloc (block)-level) |
<span> | Utilisé pour combiner des éléments en ligne dans un document, éléments en ligne (inline) |