Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to convert multiline html code to single line html code [closed]

My code is test.html:

<!DOCTYPE html>
<html>
<body>

<h1>My First Heading</h1>

<p>My first paragraph.</p>

</body>
</html>

converting to

<!DOCTYPE html><html><body><h1>My First Heading</h1><p>My first paragraph.</p></body></html>

I am using manual converting , please tell me there is any online converter for converting multiline html code to single line html

like image 667
chakri Avatar asked Aug 22 '13 06:08

chakri


People also ask

How do I make one line in HTML code?

In this article, we will add a single line break using the <br> tag. It s used to give the single line break. It is the empty tag so it does not contain end tag.

How do you convert multiple lines to one line?

Step 1: Be prepared with the text which you want to convert. Step 2: Copy the text, JSON, String, Pdf or XML (whichever you want to convert). Step 3: Paste the copied content in the space provided. Step 4: Finally click the "convert" option to get the text converted in a single line.

How do I display text line by line in HTML?

Yes, you can put them all in separate paragraphs, using the <p></p> tag or you can separate them via a <br> tag at every line. You can also use span s combined with the white-space CSS attribute, so you have a lot of options.


1 Answers

Try this :

Minify HTML (or XHTML), and any CSS or JS included in your markup

http://www.willpeavy.com/minifier/

like image 83
Mandeep Pasbola Avatar answered Nov 05 '22 12:11

Mandeep Pasbola