Recommended HTML script / utility format?

Simple question. I have a boot file with crude html pages to clean up, and I'm looking for a free open source script / utility or a free utility to remove any garbage and reformat them into well-designed consistent code. Any recommendations?

If this is relevant, I usually manipulate the HTML inside Dreamweaver, but editing the code and using the wysiwyg window as a preview rather than vica-versa, so a Dreamweaver-compatible script will be a plus.

+4
source share
11 answers

I don't think it connects to Dreamweaver, but whenever I need html, the cleaned HTML Tidy is my approach to the guy

+21
source

I am the second HTML Tidy.
I just wanted to add that this is a library with various ports and bindings. Thus, it is also integrated into some editors, such as HTML-Kit or NoteTab, and has a GUI interface. They are all linked on the page above.
Also note that the W3C Validation Validation Service has the option to "Clear Markup Using HTML-Tidy" (after displaying the validation results).

+4
source

Dreamweaver CS3 has a built-in โ€œClear HTMLโ€ option in the Commands menu. I donโ€™t think it is almost as comprehensive as HTML Tidy.

From the Adobe website :

Clear code

You can automatically remove blank tags, combine nested font tags, and otherwise improve messy or unreadable HTML or XHTML code.

For information on how to clear HTML created from a Microsoft Word document, see "Open and edit existing documents."

  • Open the document:

    • If the document is in HTML format, select> Clear HTML.
    • If the document is in XHTML, select> Clear XHTML. - For an XHTML document, the Clean Up XHTML command corrects XHTML syntax errors, sets the case of tag attributes to lowercase, and adds or reports missing attributes for the tag in addition to performing HTML cleanup operations.
  • In the dialog that appears, select any of the options and click "OK." - Note. Depending on the size of your document and the number of options selected, it may take a few seconds to complete the cleanup.

Remove Container Tags Removes tags that have no content between them. For example, <b> </b> and <font color = "# FF0000"> </font> are empty tags, but the <b> tag in <ltb> some text </b> is not.

Remove Redundant Nested Tags Removes all redundant tag instances. For example, in the code <b> This is what I <b> really </b> wanted to say </b>, the b tags surrounding this word are really redundant and will be deleted.

Delete HTML comments without Dreamweaver Deletes all comments that were not inserted by Dreamweaver. For example, <! - start the main text โ†’ will be deleted, but <! - TemplateBeginEditable name = "doctitle" โ†’ wouldnt because his comment is Dreamweaver, which marks the beginning of the region being edited in the template.

Remove custom Dreamweaver markup . Deletes comments that Dreamweaver adds to the code to allow documents to automatically update when templates and library elements are updated. If you select this option when clearing code in a document based on a template, the document will be separated from the template. For more information, see Detach a document from a template.

Delete specific tags Deletes the tags specified in the adjacent text box. Use this option to remove custom tags inserted by other visual editors and other tags that you do not want to display on your site (for example, blink). Separate multiple tags with commas (e.g. font, blink).

Merge nested <font> Tags When possible Consolidate two or more font tags when they control the same range of text. For example, <font size = "7"> <font color = "# FF0000"> big red </font> </font> will be changed to <font size = "7" color = "# FF0000"> big red </ font>.

Show Registration Complete Displays a warning window with details of changes made to the document as soon as the cleaning is completed.

+1
source

I use the HTML Formatter ... it does exactly what you are looking for.

+1
source

I definitely think the best tool is the HTML Formatter from Logichammer.com. It does exactly what you need and is easy to use. Itโ€™s worth checking it out ... the guy even has a video on his website showing how easy it is to use it. I've been using it for two years now and can't live without it ... I get a lot of dirty code.

+1
source

I use HTML Cleanup , it performs HTML cleanup and formatting well

+1
source

I would suggest purehtml.in ... it decorates the html, style and JavaScript tags ...

+1
source

You can even buffer existing HTML through Tidy HTML before it reaches the browser โ€” if it's a small traffic site, it will make things tidy without any effort.

0
source

I also recommend HTML Tidy, while Dave Ragett does not support it, this tool is certainly often updated with settings.

I am using HTML Trim , which is a win32 application, to clean up some terrible auto-generated code drops that some of our developers will knock out.

You can also grab a command line version that you can integrate into Dreamweaver.

Sorry, I cannot post more than one hyperlink - still n00b here.

0
source

I used Polystyle for a long time and I am very satisfied. It is quite flexible regarding formatting rules and costs around $ 15. Trial version available.

0
source

I would recommend vim. You can format the code block with v to select the block, and '=' is the indentation from the code.

-1
source

Source: https://habr.com/ru/post/1277249/


All Articles