Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7910111
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T12:44:07+00:00 2026-06-03T12:44:07+00:00

I have the following code . In order to obtain readability of the html

  • 0

I have the following code. In order to obtain readability of the html markup I newlined’ every inline element and indented it (1 tab = 4 spaces). Every element is appended a whitespace character  . When I take a look at the DOM using Chrome v18.0.1025.162 browser I noticed there is the whitespace I expect using the &nbsp but then there is another whitespace character. As far as I know the browser should only show the   and one whitespace from the indented next line (e.g. two indentation tabs are 8 spaces collapsed into one -> which I don’t want).

When I use { % spaceless %} ... {% endspaceless %} nothing changes. The documentation says:

The first newline after a template tag is removed automatically (like in PHP.) Whitespace is not further modified by the template engine, so each whitespace (spaces, tabs, newlines etc.) is returned unchanged.

It seems that only with inline elements whitespace tabs are not ignored and display. Is it because its within a block element and whitespaces are preserved?

How can I remove the whitespace (from indentation) then?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T12:44:26+00:00Added an answer on June 3, 2026 at 12:44 pm

    Okay, I got it working by simply removing the extra   entities. The new line with the indentation of the elements using whitespace (1 tab = 4 spaces) still creates one whitespace, but since I want to have that it’s okay so far and keeps the markup readable. Does not feel right, or let’s say it would feel better if I got more input on that issue.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following html code (in the given order) <div id=content>...</div> <div id=footer>...</div>
I have the following code: $query = mysql_query(SELECT * FROM activity ORDER BY activity_time
I have implement the following code in order to test playing a video from
I have following code to traverse a tree (pre-order): public void traverse(Node node) {
I have following code.. $query = SELECT quote, author FROM quotes ORDER BY id
i have the following code: seatContainer.getChildAt(order.seats[i]) i want to add a child to this
In order to print out something in file, I have the following code. FILE
I have following code in HTML, and I would like to retrieve name12@host.com from
All, I have the following code: $qry = Select * from vendor_options order by
In my code i have the following code: Order = config.DeploymentSteps.Select(x => x.Order).DefaultIfEmpty().Max() +

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.