English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Tutoriel de base HTML

HTML media

HTML reference manual

HTML5 Tutoriel de base

HTML5 API

HTML5 Media

Bloc HTML

HTML block is a box that stores tags and groups them.

HTML can group elements using <div> and <span>.

HTML block example

<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 ‹/›

HTML block-level elements

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>

HTML inline elements

Inline elements usually do not start on a new line when displayed.

Examples: <b>, <td>, <a>, <img> <i>

HTML <div> element

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.

HTML <span> element

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.

HTML grouping tag

TagDescription
<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)