Formatting - Settings for Tidy

In this window you can set formatting options for markup languages (like HTML, XML) that will be passed as parameters to the external Tidy(r) program. It is also possible to set formatting options for script languages.

You can bring up the window using the Add Formatting Profile command, or Modify Formatting Profile command in the menu next to the Tidy(r) Predefined Format ting Settings list in the Program Settings - Formatting Source Code window.

The window is divided into three tabs:
  • Code appearance after formatting
  • Syntax corrections introduced
  • Document language settings

Code appearance after formatting

The options of this tab allow for general settings regarding the appearance of the code after formatting, setting indentation, capitalization, etc.

Breaking lines ... on a column
Check this option if you want lines to be broken in a specific column. Then select the column in which to break the line.

Wrap attribute values
Check this option to allow line breaking between the name and the tag's attribute value if the value does not fit on a single line (exceeds the line length specified above). The string inside the attribute value will not be changed, i.e. no end-of-line character will be inserted there, even if the line does not fit into the line length specified above.

Wrap strings in scripts
Check this option if you want to wrap lines in character strings used in scripts. If the character strings must remain unchanged, do not check this option!

Wrap lines in ASP scripts (<% ... %>)
Select this option if you want to wrap lines in ASP scripts (in the block between <% and %>).

Wrap lines in JSTE (<# ... #>)
Select this option if you want to wrap lines in JSTE (in the block between <# and #>).

Wrap lines in PHP
scripts Select this option if you want to wrap lines in PHP scripts (in the block between <? and ?>).

Wrap the line before the tag <BR>
Check this option if you want the <BR> (HTML line break tag) a line break was inserted.

Each attribute in a new line
Check this option if you want each tag attribute to be placed on a new line.

Indents
Select whether and which line indentations to set in the document:
  • yes
  • automatically
  • no

Indentation
Select the depth of a single indentation (number of spaces).

Tabulation
Set the number of spaces that make up one tab character.

Tags in capital letters
Check this switch to change the case of all letters in tag names to uppercase.

Attributes in capital letters
Check this switch to change the case of all letters in attribute names to uppercase.

Syntax corrections introduced

In this tab, you can set detailed options for formatting tags.

Delete blank paragraphs (<P> </P>)
Select this option to delete all empty paragraphs. They are most often inserted by WYSIWYG editors

Wrap the loosely written text with paragraph tags ( <P> </P> )
Select this option if you want text placed directly in the document (but not in a table, etc.) to be included in paragraph tags ( <P> </P> ).

Enclose text inside other tags with paragraph tags
Select this option if you want text placed between other tags (such as a table, etc.) to be included in paragraph tags ( <P> </P> ).

Replace <B> and <I> with <STRONG> and <EM> Check this option if you want to replace the formatting-only tags with the tags that define the significance (weight, type) of the text in question:

  • <B> with <STRONG>
  • <I> with <EM>

Replace outdated formatting with styles
Check this option if you want tags marked as obsolete in the HTML specification to be replaced by CSS styles.

Remove <FONT> tags
Check this option to remove <FONT> tags from your document. These tags are marked asdeprecated in the HTML specification.

Remove additional Word metainformation
Check this option if you want the program to remove additional information placed in your document when you export text from MS Word to an HTML document. These meta-information are usually not necessary and cause significant degradation in the readability of HTML code.

Prefer numeric entities
Check this option to allow entities (i.e. special strings that cause the browser to display the corresponding symbol) other than those embedded in HTML(&, <, > and ") to be converted from text to numeric form (e.g. a text entity for a 1 character is ½ and its form is ½;). Note that only entities conforming to the declared DOCTYPEwill be used

Write non-breakable spaces as entities
Select this option to replace unbreakable (hard) spaces with the   entity.

Replace " and ' with entities
Select this option to replace quotation marks in the text with entities (" and ' respectively)

Replace & with entities
Select this option to replace the & characters in the text with the & entity.

Replace / with / in URLs
Check this option to replace the \ character in URLs with /. The \ character is used in MS Windows and inserted by programs when typing relative paths.

Don't change whitespace in attributes
Check this option to leave blank spaces (spaces, line breaks) in tag attributes exactly the same.

Correct invalid comments
Check this option to correct any invalid comments that contain illegal characters, e.g. a comment in a comment, etc.

Default image description (ALT) in <IMG>
Enter the text you want to include in the graphic description in this field (if it is not typed in the tag).

Document language settings

Here you can set options that determine the type of document to be formatted using the current formatting style.

Parsing instructions require ?>
Select this option if the program should convert delimiters from ">" to the required form "?>" into processing instructions.

Input document in XML
Check this option if the current document is an XML document.

Output document in XML
Check this option if you want the document to be formatted according to the XML specification.

Output document in XHTML
Check this option if you want the document to be formatted according to the XHTML specification

Add <?xml declaration?>
Select this option if you want because you have inserted an XML version declaration in your XML or XHTML documents into the document.

Add XML processing instructions
Check this option if you want to addprocessing instructions to your XML document.

Skip optional closing tags
Select this option if you want to omit optional closing tags (such as </LI>, </P>).

Add xml:space="preserve" when needed
Check this option if you want the xml:space="preserve" construct to be inserted into the document when required by the specification.

Document type
Select from the list the type of document (DOCTYPE) that is to be generated by the program, or define your own (enter in the field below).

Related topics

To top