Visual Studio 2010 breaks HTML formatting -


is there way visual studio 2010 format html code when reformatting?

in html,

<div><span></span></div> 

is different

<div> <span></span> </div> 

because of space after <div>.

once there space, doesn't matter how many spaces or line breaks there are... so

<div> <span></span> </div> 

is same as

<div>      <span></span>  </div> 

however, editor quite happy insert or remove spaces/linebreaks between tags. cases, won't matter much, in cases, critical control whether there whitespace between tags.

similarly, may want have <span> </span> space between tags, editor removes space!

is there solution this?

use &nbsp; if want make sure space conserved. browsers may optimize out empty divs example (see this question), , containing whitespace considered being empty.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -