How to provide well-formatted HTML when viewing source code in a browser?

When I “browse the source” using different browsers, my web pages always seem to have a lot of spaces and are poorly formatted. I am developing a Java web application using JSP.

How can I make sure that when I 'look at the source' I see beautifully formatted HTML?

Edit:

When I say formatting, I usually mean:

I get things like this:

<div>




                     <p>some text</p>
     </div>

when I want:

<div>
      <p>some text</p>
</div>

In my JSP (including use), everything is formatted nicely.

+5
source share
4 answers

View Source , , , , HTML , .

. HTML , HTML. Chrome Internet Explorer F12 , , F12 Firebug Firefox, .

. /HTML-, , - , . , script / .

+3

html Java webapp Servlet Filter. , , , , - , JTidyFilter.

, .

+1

, Chrome " " javascript. HTML, . , .

0
0

All Articles