HTML-Valid
view release on metacpan or search on metacpan
lib/HTML/Valid.pod view on Meta::CPAN
Type: true or false
Default: true
This option specifies if Tidy should coerce a start tag into an end tag in cases where it looks like an end tag was probably intended; for example, given
C<< <span>foo <b>bar<b> baz</span> >>
Tidy will output
C<< <span>foo <b>bar</b> baz</span> >>
=item css-prefix
$htv->set_option ('css-prefix', <value>);
Type: string
Default: <empty>
This option specifies the prefix that Tidy uses for styles rules.
By default, C<< c >> will be used.
=item decorate-inferred-ul
$htv->set_option ('decorate-inferred-ul', <value>);
Type: true or false
Default: false
This option specifies if Tidy should decorate inferred C<< <ul> >> elements with some CSS markup to avoid indentation to the right.
=item doctype
$htv->set_option ('doctype', <value>);
Type: string
Default: <empty>
This option specifies the DOCTYPE declaration generated by Tidy.
If set to C<< omit >> the output won't contain a DOCTYPE declaration. Note this this also implies C<< numeric-entities >> is set to C<< yes >>
If set to C<< html5 >> the DOCTYPE is set to C<< <!DOCTYPE html> >>.
If set to C<< auto >> (the default) Tidy will use an educated guess based upon the contents of the document.
If set to C<< strict >>, Tidy will set the DOCTYPE to the HTML4 or XHTML1 strict DTD.
If set to C<< loose >>, the DOCTYPE is set to the HTML4 or XHTML1 loose (transitional) DTD.
Alternatively, you can supply a string for the formal public identifier (FPI).
For example:
C<< doctype: "-//ACME//DTD HTML 3.14159//EN" >>
If you specify the FPI for an XHTML document, Tidy will set the system identifier to an empty string. For an HTML document, Tidy adds a system identifier only if one was already present in order to preserve the processing mode of some browsers. Tidy ...
This option does not offer a validation of document conformance.
=item drop-empty-elements
$htv->set_option ('drop-empty-elements', <value>);
Type: true or false
Default: true
This option specifies if Tidy should discard empty elements.
=item drop-empty-paras
$htv->set_option ('drop-empty-paras', <value>);
Type: true or false
Default: true
This option specifies if Tidy should discard empty paragraphs.
=item drop-font-tags
$htv->set_option ('drop-font-tags', <value>);
Type: true or false
Default: false
Deprecated; I<do not use>. This option is destructive to C<< <font> >> tags, and it will be removed from future versions of Tidy. Use the C<< clean >> option instead.
If you do set this option despite the warning it will perform as C<< clean >> except styles will be inline instead of put into a CSS class. C<< <font> >> tags will be dropped completely and their styles will not be preserved.
If both C<< clean >> and this option are enabled, C<< <font> >> tags will still be dropped completely, and other styles will be preserved in a CSS class instead of inline.
See C<< clean >> for more information.
=item drop-proprietary-attributes
$htv->set_option ('drop-proprietary-attributes', <value>);
Type: true or false
Default: false
This option specifies if Tidy should strip out proprietary attributes, such as Microsoft data binding attributes.
=item enclose-block-text
$htv->set_option ('enclose-block-text', <value>);
Type: true or false
Default: false
This option specifies if Tidy should insert a C<< <p> >> element to enclose any text it finds in any element that allows mixed content for HTML transitional but not HTML strict.
=item enclose-text
lib/HTML/Valid.pod view on Meta::CPAN
Default: false
This option specifies if Tidy should combine class names to generate a single, new class name if multiple class assignments are detected on an element.
=item join-styles
$htv->set_option ('join-styles', <value>);
Type: true or false
Default: true
This option specifies if Tidy should combine styles to generate a single, new style if multiple style values are detected on an element.
=item language
$htv->set_option ('language', <value>);
Type: string
Default: <empty>
Currently not used, but this option specifies the language Tidy would use if it were properly localized. For example: C<< en >>.
=item literal-attributes
$htv->set_option ('literal-attributes', <value>);
Type: true or false
Default: false
This option specifies how Tidy deals with whitespace characters within attribute values.
If the value is C<< no >> Tidy normalizes attribute values by replacing any newline or tab with a single space, and further by replacing any contiguous whitespace with a single space.
To force Tidy to preserve the original, literal values of all attributes and ensure that whitespace within attribute values is passed through unchanged, set this option to C<< yes >>.
=item logical-emphasis
$htv->set_option ('logical-emphasis', <value>);
Type: true or false
Default: false
This option specifies if Tidy should replace any occurrence of C<< <i> >> with C<< <em> >> and any occurrence of C<< <b> >> with C<< <strong> >>. Any attributes are preserved unchanged.
This option can be set independently of the C<< clean >> option.
=item lower-literals
$htv->set_option ('lower-literals', <value>);
Type: true or false
Default: true
This option specifies if Tidy should convert the value of an attribute that takes a list of predefined values to lower case.
This is required for XHTML documents.
=item markup
$htv->set_option ('markup', <value>);
Type: true or false
Default: true
This option specifies if Tidy should generate a pretty printed version of the markup. Note that Tidy won't generate a pretty printed version if it finds significant errors (see C<< force-output >>).
=item merge-divs
$htv->set_option ('merge-divs', <value>);
Type: integer
Default: 2
This option can be used to modify the behavior of C<< clean >> when set to C<< yes >>.
This option specifies if Tidy should merge nested C<< <div> >> such as C<< <div><div>...</div></div> >>.
If set to C<< auto >> the attributes of the inner C<< <div> >> are moved to the outer one. Nested C<< <div> >> with C<< id >> attributes are I<not> merged.
If set to C<< yes >> the attributes of the inner C<< <div> >> are discarded with the exception of C<< class >> and C<< style >>.
=item merge-emphasis
$htv->set_option ('merge-emphasis', <value>);
Type: true or false
Default: true
This option specifies if Tidy should merge nested C<< <b> >> and C<< <i> >> elements; for example, for the case
C<< <b class="rtop-2">foo <b class="r2-2">bar</b> baz</b> >>,
Tidy will output C<< <b class="rtop-2">foo bar baz</b> >>.
=item merge-spans
$htv->set_option ('merge-spans', <value>);
Type: integer
Default: 2
This option can be used to modify the behavior of C<< clean >> when set to C<< yes >>.
This option specifies if Tidy should merge nested C<< <span> >> such as C<< <span><span>...</span></span> >>.
The algorithm is identical to the one used by C<< merge-divs >>.
=item ncr
$htv->set_option ('ncr', <value>);
Type: true or false
lib/HTML/Valid.pod view on Meta::CPAN
=item quiet
$htv->set_option ('quiet', <value>);
Type: true or false
Default: false
This option specifies if Tidy should output the summary of the numbers of errors and warnings, or the welcome or informational messages.
=item quote-ampersand
$htv->set_option ('quote-ampersand', <value>);
Type: true or false
Default: true
This option specifies if Tidy should output unadorned C<< & >> characters as C<< & >>.
=item quote-marks
$htv->set_option ('quote-marks', <value>);
Type: true or false
Default: false
This option specifies if Tidy should output C<< " >> characters as C<< " >> as is preferred by some editing environments.
The apostrophe character C<< ' >> is written out as C<< ' >> since many web browsers don't yet support C<< ' >>.
=item quote-nbsp
$htv->set_option ('quote-nbsp', <value>);
Type: true or false
Default: true
This option specifies if Tidy should output non-breaking space characters as entities, rather than as the Unicode character value 160 (decimal).
=item repeated-attributes
$htv->set_option ('repeated-attributes', <value>);
Type: integer
Default: 1
This option specifies if Tidy should keep the first or last attribute, if an attribute is repeated, e.g. has two C<< align >> attributes.
=item replace-color
$htv->set_option ('replace-color', <value>);
Type: true or false
Default: false
This option specifies if Tidy should replace numeric values in color attributes with HTML/XHTML color names where defined, e.g. replace C<< #ffffff >> with C<< white >>.
=item show-body-only
$htv->set_option ('show-body-only', <value>);
Type: integer
Default: 0
This option specifies if Tidy should print only the contents of the body tag as an HTML fragment.
If set to C<< auto >>, this is performed only if the body tag has been inferred.
Useful for incorporating existing whole pages as a portion of another page.
This option has no effect if XML output is requested.
=item show-errors
$htv->set_option ('show-errors', <value>);
Type: integer
Default: 6
This option specifies the number Tidy uses to determine if further errors should be shown. If set to C<< 0 >>, then no errors are shown.
=item show-info
$htv->set_option ('show-info', <value>);
Type: true or false
Default: true
This option specifies if Tidy should display info-level messages.
=item show-warnings
$htv->set_option ('show-warnings', <value>);
Type: true or false
Default: true
This option specifies if Tidy should suppress warnings. This can be useful when a few errors are hidden in a flurry of warnings.
=item skip-nested
$htv->set_option ('skip-nested', <value>);
Type: true or false
Default: true
This option specifies that Tidy should skip nested tags when parsing script and style data.
=item slide-style
$htv->set_option ('slide-style', <value>);
( run in 0.544 second using v1.01-cache-2.11-cpan-119454b85a5 )