Jump to content

Easy way to format a php/html file?


therealwesfoster

Recommended Posts

I'm sure where else to post this.. but I was curious.

 

I'm always doing modification for people on their scripts, and when I open the file I see: (example)

 

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	<title></title>
		<meta name="description" content="" />
		<meta name="keywords" content="" />



<link rel="shortcut icon" href="images/logo.ico" />		






	<link rel="stylesheet" type="text/css" href="css/test.css" media="screen" />






                 <link rel="stylesheet" type="text/css" href="css/table_main.css" media="screen" />
        	<link rel="stylesheet" type="text/css" href="css/screen.css" media="screen" />









</head>




















<body id="bd" >


............

</body>

          </html>

(it actually looks cleaner than what it really is because all the spaces are parsed)

 

 

Anyway, my point is this. I'm very picky about my code, so before I do anything, I make it look like this:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title></title>
  <meta name="description" content="" />
  <meta name="keywords" content="" />
  <link rel="shortcut icon" href="images/logo.ico" />		
</head>

<body id="bd">

........

</body>
</html>

 

 

I was just wondering if there was a program you could load the file into that would parse alot of the newlines and spaces in order for it to look neater? It would save me alot of time and trouble.

 

Anyway, please let me know :)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.