top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

How to preserve white spaces in html?

0 votes
61 views
How to preserve white spaces in html?
posted Apr 24, 2018 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

2 Answers

0 votes

Using pre tag we can preserve whitespace in HTML.

Example:

<pre>Query     Home</pre>

Also, using CSS we can preserve white space by using below styles.

.element  { 
   white-space: pre; 
}
answer Apr 30, 2018 by Sandeep Bedi
0 votes

Hello...

Using <PRE> to preserve white space, tabs, and line breaks can come in very useful with certain types of content.

<pre>Content here</pre>
answer Jan 20 by Siddhi Patel
Similar Questions
0 votes

Create a webpage that displays the hyperlink with the following color attributes.

  • Set the color as %FF0000 for unvisited link
  • Set the color as %FF00 for visited link
  • Set the color as %FF00FF for mouse over link
  • Set the color as %0000FF for selected link
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...