Re: Converting transitional to strict
On 16 mai, 09:10, Alfred Molon <alfred_mo...@yahoo.com> wrote:
> I was trying to convert the pages from my site from transitional to
> strict and ran into problems.
> I was wondering if perhaps some
> translators/converters exist, which convert transitional code into
> strict code.
HTML Tidy would do that but it's not a perfect tool to convert page
written according to a transitional DTD into one written according to
There are several HTML Tidy options which do that:
This option specifies if Tidy should strip out surplus presentational
tags and attributes replacing them by style rules and structural
markup as appropriate. It works well on the HTML saved by Microsoft
This option specifies if Tidy should discard <FONT> and <CENTER> tags
without creating the corresponding style rules. This option can be set
independently of the clean option.
This option specifies if Tidy should insert a <P> element to enclose
any text it finds in any element that allows mixed content for HTML
transitional but not HTML strict.
Best is still to learn how to fix HTML errors starting from the W3C
markup validator and learn how to avoid writing HTML errors in the
I use Bluefish 1.0.7 with HTML Tidy on Linux; I use PSPad 4.5.4 with
HTML Tidy on Windows.
These are the arguments I use with Bluefish:
tidy --char-encoding utf8 --clean yes --doctype strict --drop-font-
tags yes --drop-proprietary-attributes yes --enclose-block-text yes --
enclose-text yes -indent --logical-emphasis yes --output-html yes --
replace-color yes --show-warnings no --wrap 76 --write-back yes >'%f'
Internet Explorer 7 bugs: 185 bugs so far
Internet Explorer 8 bugs: 60 bugs so far
|All times are GMT. The time now is 02:56 AM.|
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.