Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
What Happens to Multiple White Spaces in In-line Elements
What Happens to Multiple White Spaces in In-line Elements? - CSS Tutorials - Understanding Multiple Element Formatting Rules
✍: FYIcenter.com
If there is a sequence of multiple white spaces and it is broken into pieces in different in-line elements, it will collapsed into the first white space on the left hand side, the first white space. The HTML tags will not stop collapsing multiple white spaces.
The following tutorial exercise shows you some good examples:
<html><head>
<style type="text/css">
H1 {font-size: 20px}
DIV.page {width: 350px; border: 1px solid black}
TABLE#out {background-color: #ffdddd}
TD#box {border: 1px solid black}
SPAN#w {background-color: #ffffff;
font-size: 24px; line-height: 36px}
SPAN#b {background-color: #ddddff;
font-size: 24px; line-height: 36px}
</style>
</head><body><div class="page">
<H1>White Spaces Collapsed to the Left</H1>
<table id=out><tr><td>
<span id=w>Welcome to</span><span id=b>FYIcenter!</span>
<br/>
<span id=w>Welcome to</span> <span id=b>FYIcenter!</span>
<br>
<span id=w>Welcome to </span><span id=b> FYIcenter!</span>
<br/>
<span id=w>Welcome to </span> <span id=b> FYIcenter!</span>
</td></tr></table>
<p align="right">By FYIcenter.com</p>
<div></body></html>
Save this document as inlineElementWhiteSpaces.html, and view it with a browser,
you will see something like this:

2007-05-11, 5442👍, 0💬
Popular Posts:
What is the concept of XPOINTER? XPOINTER is used to locate data within XML document. XPOINTER can p...
What is normalization? What are different types of normalization? It is set of rules that have been ...
The object that contains all the properties and methods for every ASP.NET page, that is built is .. ...
What are shared (VB.NET)/Static(C#) variables? Static/Shared classes are used when a class provides ...
What are the core functionalities in XML .NET framework? Can you explain in detail those functionali...