HTMLPad 4.0: How to Remove Spaces/Blanks in Code Lines?

Post your questions and problem reports here

Moderator: kfury77

Forum rules
Please try to follow these guidelines. This will help to receive faster and more accurate response.

  • Check the Support section of the corresponding product first. Chances are you will find your answer there;
  • Do not create new topics for already reported problems. Add your comments to the existing topics instead;
  • Create separate topic for each problem request. Do NOT post a number of non-related problem reports in a single topic;
  • Give your topic a meaningful title. Titles such as "A question," "Bug report" and "Help!" provide others no clue what your message is about;
  • Include the version number of the software you are using;
  • This is not an official customer support helpdesk. If you need a prompt and official response, please contact our support team directly instead. It may take a while until you receive a reply in the forum;

HTMLPad 4.0: How to Remove Spaces/Blanks in Code Lines?

Postby MarkSydney » Mon Sep 01, 2014 6:09 am

HTMLPad 2014 4.0: I am new to the Forums so apologize in advance if this was covered before, but I could not find the answer using Search.

I need to remove spaces/blanks in the code lines of a new HTML; compress multiple lines into 1 line by removing the line spaces and blanks. The objective is to have a 'leaner' file with minimum code lines.

Example:
<tr><td>column 1</td>
<td >column 2</td>
becomes
<tr><td>column 1</td><td>column 2</td>

I guess it would be similar to menu CSS: Compress CSS Code, but for HTML code lines.
MarkSydney
 
Posts: 3
Joined: Wed May 21, 2014 10:22 am

Re: HTMLPad 4.0: How to Remove Spaces/Blanks in Code Lines?

Postby Aivars » Mon Sep 01, 2014 12:38 pm

You can use HTML Tidy profile Clean and Compress HTML to achieve that (menu Tools -> HTML Tidy).
Blumentals Software Programmer
User avatar
Aivars
Blumentals Software Developer
 
Posts: 2456
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: HTMLPad 4.0: How to Remove Spaces/Blanks in Code Lines?

Postby MarkSydney » Tue Sep 02, 2014 4:22 am

Hi Aivars,

Thanks for the prompt response. I may be doing something wrong but these are my attempts with Tidy.

Original new HTML with a simple table looks like this (keeping all the line spaces as in editor):
<html>

<head>
<title>Untitled</title>
</head>

<body>
<table>
<tr>
<td>row 1 column 1</td>
<td>row 1 column 2</td>
</tr>
<tr>
<td>row 2 column 1</td>
<td>row 2 column 2</td>
</tr>
</table>
</body>

</html>

SO, I want to compress these lines but when
Tools > HTML Tidy > Clean and Compress HTML, I get this result (spaces between html and head removed, but spaces between table cells ADDED!)

<html>
<head>
<title>Untitled</title>
</head>

<body>
<table>
<tr>
<td>row 1 column 1</td>

<td>row 1 column 2</td>
</tr>

<tr>
<td>row 2 column 1</td>

<td>row 2 column 2</td>
</tr>
</table>
</body>
</html>
MarkSydney
 
Posts: 3
Joined: Wed May 21, 2014 10:22 am


Return to HTMLPad / Rapid CSS / Rapid PHP / WeBuilder Support

Who is online

Users browsing this forum: No registered users and 27 guests

cron