search
HomeWeb Front-endHTML TutorialStudy notes summary of block-level elements and row-level (inline) elements of HTML (including HTML5)

1. First we need to know what are block-level elements and row-level (inline) elements ?

Characteristics of block elements:

①Always start on a new line;

②Height, line height, margins and padding can all be controlled;

③The default width is 100% of its container, unless a width is set;

④ It can hold inline elements and other block elements.

Characteristics of inline elements:


① and other elements are on the same line;


② height, line height, outer margins and inner margins cannot be changed;


③ width is its text Or the width of the picture, which cannot be changed;

④Inline elements can only accommodate text or other inline elements.

2. Okay, let’s take a look at the Block LevelElements:

div: Document section
section: Document section
nav: Navigation
header: Header
article: Article
aside: Article sidebar
footer: Footer
details: Details of the element
summary: The visible title of the details element
dialog: dialog window
h1, h2, h3, h4, h5, h6: title
p: paragraph
ul: unordered list
ol: ordered list
dir: directory list
li: project
dl: list
dt : list item
dd: item description
menu: menu of commands, list
menuiitem: menu item
command: command button
form: form
fieldset: the border around the element (can be used to group elements within the form)
legend: in the border The title on
select: select list (inline element)
optgroup: combined select list options
option: select list options (can also be used as datalist option)
datalist: drop-down list (id should be bound to the list attribute value in the input)
table: table
caption: table title
thead: combined header content (th)
tbody: combined body content (td)
tfoot: combined table note content (td)
tr: table row
th: header cell
td: table unit
col: table column attribute; (empty label)
colgroup: table formatting column group;
iframe: inline frame
figure: media content group
figcaption: figure title
map: image mapping
area: Image area
canvas: graphics container (script to draw graphics)
video: video
source: media source
track: text track
audio: sound content
br: newline (empty label)
hr: horizontal dividing line (empty label)
pre: Formatted text
blockquote: Block quote
address: Document contact information
center: Centered text (deprecated)
spacer: Insert space (empty element) horizontally and vertically

3. Next, let’s look at the row-level (inline) elements:

span: inline container
abbr: abbreviation
em: emphasis
strong: bold emphasis
mark: highlighted text
b: bold
i: italic
bdi: text direction
bdo: text direction
big: Large font
small: small font
sup: superscript
sub: subscript
del: deleted text
strike: strikethrough
s: strikethrough
ins: inserted text
u: underline
nobr: prohibit line breaks
wbr: word wrap timing (empty tag)
tt: typewriter text
kbd: keyboard text
time: date/time
cite: quote
q: short quote ("")
font: font setting (not commonly used)
acronym: abbreviation (not supported by html5)
dfn: field (not commonly used)
a: anchor
img: image
embed: embedded (empty label)
label: input tag (click on the text to trigger the control)
input: input box
button: button
keygen: generate key (empty label)
textarea: multi-line text input box
output: output result
ruby: Chinese phonetic
rt: phonetic
rp: The browser does not support the content displayed by ruby ​​elements
progress :progress bar
meter: measure
var: define variable
code: computer code text
samp: computer code sample
select: drop-down list

Please correct me if there are any errors or omissions, thank you!

Statement
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
From Text to Websites: The Power of HTMLFrom Text to Websites: The Power of HTMLApr 13, 2025 am 12:07 AM

HTML is a language used to build web pages, defining web page structure and content through tags and attributes. 1) HTML organizes document structure through tags, such as,. 2) The browser parses HTML to build the DOM and renders the web page. 3) New features of HTML5, such as, enhance multimedia functions. 4) Common errors include unclosed labels and unquoted attribute values. 5) Optimization suggestions include using semantic tags and reducing file size.

Understanding HTML, CSS, and JavaScript: A Beginner's GuideUnderstanding HTML, CSS, and JavaScript: A Beginner's GuideApr 12, 2025 am 12:02 AM

WebdevelopmentreliesonHTML,CSS,andJavaScript:1)HTMLstructurescontent,2)CSSstylesit,and3)JavaScriptaddsinteractivity,formingthebasisofmodernwebexperiences.

The Role of HTML: Structuring Web ContentThe Role of HTML: Structuring Web ContentApr 11, 2025 am 12:12 AM

The role of HTML is to define the structure and content of a web page through tags and attributes. 1. HTML organizes content through tags such as , making it easy to read and understand. 2. Use semantic tags such as, etc. to enhance accessibility and SEO. 3. Optimizing HTML code can improve web page loading speed and user experience.

HTML and Code: A Closer Look at the TerminologyHTML and Code: A Closer Look at the TerminologyApr 10, 2025 am 09:28 AM

HTMLisaspecifictypeofcodefocusedonstructuringwebcontent,while"code"broadlyincludeslanguageslikeJavaScriptandPythonforfunctionality.1)HTMLdefineswebpagestructureusingtags.2)"Code"encompassesawiderrangeoflanguagesforlogicandinteract

HTML, CSS, and JavaScript: Essential Tools for Web DevelopersHTML, CSS, and JavaScript: Essential Tools for Web DevelopersApr 09, 2025 am 12:12 AM

HTML, CSS and JavaScript are the three pillars of web development. 1. HTML defines the web page structure and uses tags such as, etc. 2. CSS controls the web page style, using selectors and attributes such as color, font-size, etc. 3. JavaScript realizes dynamic effects and interaction, through event monitoring and DOM operations.

The Roles of HTML, CSS, and JavaScript: Core ResponsibilitiesThe Roles of HTML, CSS, and JavaScript: Core ResponsibilitiesApr 08, 2025 pm 07:05 PM

HTML defines the web structure, CSS is responsible for style and layout, and JavaScript gives dynamic interaction. The three perform their duties in web development and jointly build a colorful website.

Is HTML easy to learn for beginners?Is HTML easy to learn for beginners?Apr 07, 2025 am 12:11 AM

HTML is suitable for beginners because it is simple and easy to learn and can quickly see results. 1) The learning curve of HTML is smooth and easy to get started. 2) Just master the basic tags to start creating web pages. 3) High flexibility and can be used in combination with CSS and JavaScript. 4) Rich learning resources and modern tools support the learning process.

What is an example of a starting tag in HTML?What is an example of a starting tag in HTML?Apr 06, 2025 am 12:04 AM

AnexampleofastartingtaginHTMLis,whichbeginsaparagraph.StartingtagsareessentialinHTMLastheyinitiateelements,definetheirtypes,andarecrucialforstructuringwebpagesandconstructingtheDOM.

See all articles

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

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools