Cleaning up source code

Namo WebEditor can clean up and/or reformat messy source code in documents created in other programs.

Namo WebEditor can perform the following cleanup functions:

  • Remove proprietary tags added by Microsoft Word
  • Remove empty elements (such as <a></a>)
  • Remove redundantly nested tags (such as <b>Hello <b>world</b></b>)
  • Remove optional closing tags (such as closing </p> tags)
  • Integrate adjacent <font> tags where possible
  • Remove comments
  • Remove occurrences of a specified tag
  • Remove unnecessary empty lines

Namo WebEditor can reformat source code in the following ways:

  • Wrap long lines after a specified number of characters
  • Indent child elements by a specified number of spaces or tabs
  • Capitalize tag names
  • Capitalize attribute names
To clean up or reformat the current document’s source code
  1. On the Home menu, go to Edit, and then click Clean Up HTML.
  2. Select the desired options, and then click OK.

Namo Web Editor icon note Cleaning up source codeAfter performing a cleanup operation, if you do not like the result, immediately return to Edit mode and use the Undo command. This is the only way to reverse the effects of a cleanup or reformatting operation, short of manual editing.

Cleaning up source code