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

  • Home
  • SEARCH
  • 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 860567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T08:50:11+00:00 2026-05-15T08:50:11+00:00

Is there any information on how to correctly handle white spaces in XHTML (1.0

  • 0

Is there any information on how to correctly handle white spaces in XHTML (1.0 Transitional)? It seems as if XHTML does not use standard XML white space handling.

Edit: Mayby I was a bit unprecise about what I was exactly looking for. I’m more interested in how an element gets rendered than how it would be processed by an XML processor.
For example the following will render with 1 white space inbetween:

<em> em content </em> following text

The situation gets more complicated if the space actually has its own formatting, for example <a href="http://www.google.de"> content of the hyperlink </a> content after the hyperlink will have an underlined space at the end of the hyperlink, while <a href="http://www.google.de"> content of the hyperlink</a> content after the hyperlink<br /> will not underline the the space.

It seems as if the space is always appended to the previous formatting scope and white spaces are handled over (inline) element begin and end tags. But this is based solely on testing and I was wondering if there is some kind of specification on how excatly this behaves.

  • 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-05-15T08:50:12+00:00Added an answer on May 15, 2026 at 8:50 am

    It seems that there is no real documentation on how white spaces are rendered in XHTML. Here is what I found out by experiment:

    1. White spaces are reduced into a single space even over begin and end tags within the same block
    2. The space will be put into the formatting scope of the containing tag. If it spans two tags it will be added to the first tag.
    3. Spaces at the begin and end of block elements or span elements which are the first child element/ the last child element in their block are ignored.
    4. White spaces outside of block elements are ignored.

    This is all I could figure out. It is kind of sad that the XHTML specifiaction does not contain information about rendering of white spaces.

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

Sidebar

Related Questions

Is there any information available for the next version ( 2011 ) of Delphi
Is there any way to retrieve information about how many extra displays there are
Is there any way to output/display information from a MATLAB program without an ending
Is there any way to get time-related information in directions from the Google Maps
Is there any way where we can pick up some information from another web
Is there any library in C for Linux to get gpu information for example
I've seen this here and there, but can't find any information regarding this thing.
I want to know if there are any existing benchmarks and sizing information for
I have not been able to find any information about the topic online, so
Is there any functional difference in Python between a try statement and an if

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.