Inline elements

Summary

HTML (Hypertext Markup Language) elements are usually "inline" elements or "block-level" elements. An inline element occupies only the space bounded by the tags that define the inline element. The following example demonstrates the inline element's influence:

Inline example

HTML

HTML
<p>This <span>span</span> is an inline element; its background has been colored to display both the beginning and end of the inline element's influence</p>

CSS

CSS
span { background-color: #8ABB55; }

Inline vs. block-level

Content model
Generally, inline elements may contain only data and other inline elements.
Formatting
By default, inline elements do not begin with new line.

Elements

The following elements are "inline":

See also

License

© 2016 Mozilla Contributors
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-us/docs/web/html/inline_elements

Beginner HTML HTML:Element Reference