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.
HTMLPad 4.0: How to Remove Spaces/Blanks in Code Lines?
Moderator: kfury77
Forum rules
Please try to follow these guidelines. This will help to receive faster and more accurate response.
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;
-
- Posts: 3
- Joined: Wed May 21, 2014 10:22 am
Re: HTMLPad 4.0: How to Remove Spaces/Blanks in Code Lines?
You can use HTML Tidy profile Clean and Compress HTML to achieve that (menu Tools -> HTML Tidy).
Blumentals Software Programmer
-
- Posts: 3
- Joined: Wed May 21, 2014 10:22 am
Re: HTMLPad 4.0: How to Remove Spaces/Blanks in Code Lines?
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>
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>