Getting Extra White Spaces in HTML

Q

How To Get an Extra White Space?

✍: FYIcenter.com

A

As you know that white space characters will be ignored in elements like "p". So how to get some extra white space to show up in your text paragraphs? On easy solution is to use XHTML entity: " ", which stands for "non-breaking space".

Here is an example of using "nbsp":

  <!-- 4 white spaces at the beginning of the paragraph -->
  <p>&nbsp;&nbsp;&nbsp;&nbsp;There was once upon a time
    a peasant-woman who had a daughter and a step-
    daughter.</p>

 

HTML Document Structure and Head Level Tags

White Space Characters Handling Rules in HTML

Introduction of HTML Element Content Syntax

⇑⇑ HTML Tutorials

2024-02-18, 1026🔥, 0💬