Table of Contents
First, inline elements
The second block element
The difference between third inline and block elements
Home Web Front-end HTML Tutorial HTML__inline elements vs. block elements

HTML__inline elements vs. block elements

Feb 18, 2017 pm 02:33 PM
html

In the HTML4.0 era, HTML element types are divided into inline elements and block-level elements.

First, inline elements

The inline element is a basic element based on the semantic level, which generally can only accommodate text and other inline elements.

The following elements are all inline elements:

b(字体加粗) 
kbd(代表文字从键盘录入) 
q(引用文字) 
big(字号比周围字体大一号) 
strong(重要文字,在盲文阅读设备中,会重点读,界面显示效果为加粗) 
script(脚本)
i(文字斜体)
samp(极少用,连字符)
span(用于组合其他内联元素)
small(比周围字体小一号)
time(html5中的新标签,用于标记时间,目前浏览器都不支持)
sub(定义下标文本,显示为其他文字高度一半)
tt(告诉浏览器,字体必须等宽)
var(告诉浏览器,这是变量)
sup(定义上标文本)
abbr(代表是长单词或短语的缩写)
a(超链接)
button(按钮)
acronym(缩写,HTML5中已弃用,请使用abbr替代)
bdo(可定义文本方向)
input(基本输入框)
cite(定义引用的文档)
br(换行符)
label(文本标签,但是有个牛逼的特性,利用for属性,可以绑定其他元素,使得鼠标点击该标签时,被绑定元素获得焦点)
code(定义源码文本)
img(图片文本)
select(下拉选择组件)
dfn(definition and usage,定义一个概念的定义处,一般的在一个文档中最先出现的地方)
map(定义一个客户端的图形映射)
textarea(文本输入框)
em(定义需要强调的文字,一般用斜体表示)
object(定义一个嵌入的对象)
Copy after login

The second block element

Block elements are generally container elements for other elements, used for layout, and need to be placed in the body inside the label.

The following are block elements:

address(定义了文章拥有者的联系信息)
figure(定义独立的流内容,例如图片、视频)
noscript(定义如果浏览器不支持脚本语言时显示的内容)
article(定义文章内容)
footer(定义文档底部)
ol(ordered list)
aside(aside content,可用做侧栏)
form(input form)
output(定义form的输出)
blockquote(定义引用于别处的内容)
h1,h2,h3,h4,h5,h6(标题)
p(段落)
canvas(画布)
header(页眉)
pre(preformatted text,定义预格式化内容)
dd(definition description)
hgroup(对标题进行组合)
section(定义页眉的区域)
p(文档分割)
hr(定义分割线)
table(表格)
dl(definistion list)
li(list item)
tfoot(table footer)
fieldset(field set label)
main(contains the central content to this document)
ul(unordered list)
figcaption(figure caption)
nav(contains navigation links)
video(video player)
Copy after login

The difference between third inline and block elements

  • By default, block elements will start a new line, and Inline elements will be inline

  • Generally, the internal structure of block elements is more complex than that of inline elements, and block elements may contain inline elements and other block elements.


For more HTML__ inline elements and block elements related articles, please pay attention to the PHP Chinese website!

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Table Border in HTML Table Border in HTML Sep 04, 2024 pm 04:49 PM

Guide to Table Border in HTML. Here we discuss multiple ways for defining table-border with examples of the Table Border in HTML.

Nested Table in HTML Nested Table in HTML Sep 04, 2024 pm 04:49 PM

This is a guide to Nested Table in HTML. Here we discuss how to create a table within the table along with the respective examples.

HTML margin-left HTML margin-left Sep 04, 2024 pm 04:48 PM

Guide to HTML margin-left. Here we discuss a brief overview on HTML margin-left and its Examples along with its Code Implementation.

HTML Table Layout HTML Table Layout Sep 04, 2024 pm 04:54 PM

Guide to HTML Table Layout. Here we discuss the Values of HTML Table Layout along with the examples and outputs n detail.

HTML Input Placeholder HTML Input Placeholder Sep 04, 2024 pm 04:54 PM

Guide to HTML Input Placeholder. Here we discuss the Examples of HTML Input Placeholder along with the codes and outputs.

HTML Ordered List HTML Ordered List Sep 04, 2024 pm 04:43 PM

Guide to the HTML Ordered List. Here we also discuss introduction of HTML Ordered list and types along with their example respectively

Moving Text in HTML Moving Text in HTML Sep 04, 2024 pm 04:45 PM

Guide to Moving Text in HTML. Here we discuss an introduction, how marquee tag work with syntax and examples to implement.

HTML onclick Button HTML onclick Button Sep 04, 2024 pm 04:49 PM

Guide to HTML onclick Button. Here we discuss their introduction, working, examples and onclick Event in various events respectively.

See all articles