I am writing a web site in php and the HTML it renders is not well formatted and hard to read in Firefox (most of it is on a single line)

I dont want to mess up my php code by adding loads of white space formatting stuff so I was wondering if there is there an option or perhaps an add-on to Firefox that will give me the ability me to view the source indented according to the HTML's structure

link|improve this question
feedback

4 Answers

up vote 4 down vote accepted

View Source Chart 2.7

Works just fine, install the extension from here : https://addons.mozilla.org/en-US/firefox/addon/655/

Right click -> View source chart

This is what I get for the Google home page HTML source:

Before:

alt text

After:

alt text

link|improve this answer
+1 Like the screenshots – Willbill Sep 23 '09 at 14:23
feedback

I normally use Firebug for debugging html output.

This allows me to se the html as it's rendered by the browser, together with the well-formatted source in Firebug. I can also inspect elements in the displayed html and see where they come from in the originating html source.

link|improve this answer
feedback

From here

View Source Chart Graphically displays source structure.

alt text

JSView 2.0.5 Displays information on page external files.

alt text

HighlightAll Highlights identical elements in the code.

alt text

Html Validator Validates HTML of the current page.

alt text

View Formatted Source Shows source structure.

alt text

SourceEditor Allows to edit code and view the results.

alt text

link|improve this answer
+1 Thanks for the suggestions – Willbill Sep 23 '09 at 14:27
feedback

web developer plugin. link.

link|improve this answer
I have this installed but its dosent do what I need I think i have not been clean enough about what i mean by "formatted" I will edit the question now – Willbill Sep 23 '09 at 13:52
At least give a brief description as to the salient feature of the plugin that relates to the question. Otherwise, it's just a flippant answer. – random Sep 23 '09 at 13:53
The web developer plugin is a very popular plugin that, among other things, allows one to view source for any page. The source view has some highlighting, so is "formatted"-- although now I see that the OP wants something more specific for the formatting. – Angelo Sep 23 '09 at 14:24
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.