Good evening. I will be very happy to help. There is for example such an ugly HTML code

<a href="/index.php"> <img src="/templates/r_first_to_j/images/logo.png" /> </a> 

</ div>

 <div id="main_menu"> <div id="horizmenu-surround"> <ul class="menutop level1" > <li class="item101 active root" >Тестовый текс лорем ипсум <a class="item" href="/ru/" > <span> 

I wanted to remove all tabs on the left (at the beginning of each line). I want to implement it in a way to remove spaces, if they are worth more than one in a row. It is important to remove spaces, tabs in such a way that they remain intact in ordinary text and inside tags.

Thank you in advance

  • google "html beautifier" -> ctrlq.org/beautifier - VladD
  • in java - romashechka environment
  • Something tells me that @romashechka is not talking about Java, but about JavaScript :)) - Barmaley

1 answer 1

Use the trim () function