HTML chunks


May 02, 2021 11:07 HTML


Table of contents


HTML slt;div> and .lt;span>


HTML can combine elements by slt;div;and slt;span.gt;


HTML chunk elements

Most HTML elements are defined as block-level or inline elements.

Block-level elements usually start (and end) with new lines when displayed in the browser.

Examples: slt;h1>, slt;p>, slt;ul>, slt;table>


HTML inline element

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

Examples: slt;b>, slt;td>, slt;a>, slt;img>


HTML . .

Labels can split documents into separate, separate parts.

HTML is a block-level element, and it is a container that can be used to combine other HTML elements.

The element has no specific meaning. In addition, because it is a block-level element, the browser displays a line before and after it.

If used with CSS, the element can be used to style properties on large blocks of content.

Another common use of elements is document layout. I t replaces the old-fashioned way of using tables to define layouts. D ocument layout using the elements is not the correct use of tables. The function of the element is to display the tabled data.

If you're familiar with how the elements are documented, you can practice using the other HTML elements in programming testing!


HTML slt;span> with elements

HTML is an inline element that can be used as a container for text

The elements also have no specific meaning.

When used with CSS, the element can be used to style properties for some text.


HTML grouping tags

标签 描述
<div> 定义了文档的区域,块级 (block-level)
<span> 用来组合文档中的行内元素, 内联元素(inline)


An example of a .lt;span.gt;

HTML . . .

<p>我有一双

<span style="color:gold">金色</span> 的

<span style="font-size:50px">大眼睛</span>和

<span style="color:blue">蓝色的头发</span>。

</p>


Try it out . . .

An example of a .lt;div.gt;

HTML and lt;div> instances

<p>这是一些文本。</p>

<div style="color:#00FFFF">

<h3>这是一个在 div 元素中的标题。</h3>

<p>这是一个在 div 元素中的文本。</p>

</div>

<p>这是一些文本。</p>


Try it out . . .