Welcome Guest! (App Version 5.16)

websitnero logo name

Inline Elements

Overview

  • Inline Elements only take the required width or horizontal space when added on HTML page.
  • Span, anchor, bold, italics, tt, em are common examples of inline tags.

Inline Elements in HTML

Inline elements are the elements that stack next to each other in the same line, if the space is available. Their characteristic is just opposite to that of 'Block Elements'.

While 2 block elements (say, a div and a p) will take full space in width and each will go to a separate line, any 2 inline elements (say, a span and an anchor) will stack next to each other in the same line.

Note: "The inline elements can be said to be Super-Adjusting. They do not have a rigid behaviour like that of 'Block Elements', but rather they are fluid in nature. Try to put 10 span elements and they will get stacked to the same line (if space is available)."

Example

<body> 
  <span>This is span1.</span>
  <a>This is anchor1.</a>
  <span>This is span2.</span>
  <span>This is span3.</span>
</body> 

Output:

This is span1. This is anchor1. This is span2. This is span3.
Further Reading

1. Inline elements

WebsiteNero is highly optimized for learning various website developing technlogies. We try our best to add maximum modules and examples to help learn the concepts clearly and vividly. We try to present all content and examples as simple as we can removing any complexity to hurdle easy understanding. We try best provide you with worthful content, but we cannot guarantee full correctness of all the content on this site. While using this website, you agree to have read and accepted all our terms of use and conditions, cookie, and privacy policy. Copyright, 2013-2018 by websitenero.com. All Rights Reserved.