Home >Web Front-end >HTML Tutorial >What are the inline elements in HTML?
Inline elements include: a, acronym, b, br, cite, code, dfn, em, font, i, img, input, kbd, label, s, samp, small, span, strong, sub , sup, textarea, u, var, strike.
#The operating environment of this tutorial: Windows 7 system, HTML5 version, Dell G3 computer.
Recommended related tutorials: html tutorial
Inline element (a concept in the HTML specification) English: inline element, which has many Chinese names, such as: inside Linked elements, inline elements, inline elements, inline elements, etc. Basically there is no unified translation. In addition, when it comes to inline elements, the attribute usually involved is display:inline; this attribute can fix the famous IE double floating border problem.
Inline elements are also called inline elements or inline elements. They are generally basic elements based on semantic level. Inline elements can only hold text or other inline elements and are usually included in block elements.
Features:
1, and other elements are on the same line;
2, height, line height, top and bottom The spacing cannot be changed;
3. The width is the width of its text or picture and cannot be changed.
Inline elements in HTML
a
- Anchor;
abbr
- Abbreviation;
acronym
- First letter;
b
- bold (not recommended);
bdo
- bidi override;
big
- Large font;
br
- Line break;
cite
- Quote;
code
- Computer code (required when citing source code);
dfn
- Define fields;
em
- Emphasis;
font
- Font settings ( Not recommended);
i
- italics;
img
- image;
input
- Input box;
kbd
- Define keyboard text;
label
- table label;
q
- short quote;
s
- dash (not recommended);
samp
- defines sample computer code;
select
- item selection;
small
- small font text;
span
- Commonly used inline container, defining blocks within text;
strike
- Center line;
strong
- bold emphasis;
sub
- subscript;
sup
- superscript;
textarea
- multi-line text input box;
tt
- telex text;
u
- underline;
var
- Define variables.
Inline elements are generally containers for content. Generally, inline elements can only contain content or other inline elements. The width and length are determined by the content and cannot be set. Can coexist peacefully with other elements. Inline elements are suitable for displaying specific content.
For more programming-related knowledge, please visit: Programming Teaching! !
The above is the detailed content of What are the inline elements in HTML?. For more information, please follow other related articles on the PHP Chinese website!