Clean & Convert to CSS - Post ID 104902

User 1974115 Photo


Registered User
6 posts

Using HTML Code Editor, and Website Projects, I have created a website consisting of six html documents.
I used "New From Layout" documents as a starting point for each of the html documents, which all started out being:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

I'm not what I may have done, or how they got this way; but now four of the html documents show a doctype:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
And two of the html documents now show:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

1.Does it matter that pages within a website have both html 4.01 and xhtml 1.0 documents?

2. Why should, and why shouldn't, I use Tools/Code Cleaner/Clean & Convert to CSS?

The documents look fine in (HTML Editor) Preview, but the Code Editor shows they have a bunch of seemingly unnecessary </FONT> tags. When I "Clean & Convert to CSS" lots of things change and the Preview doesn't look fine.

Attached are examples of one of the XHTML 1.0 Transitional//EN" & HTML 4.01 Transitional//EN" documents.

User 38401 Photo


Senior Advisor
10,951 posts

Hiya David,

If you have your site pages uploaded a link would be helpful, if not then I think you forgot to attach the files you were planning to attach :)
User 463058 Photo


Ambassador
1,075 posts
Online Now

David Eastland wrote:
1.Does it matter that pages within a website have both html 4.01 and xhtml 1.0 documents?


It doesn't matter.

David Eastland wrote:
2. Why should, and why shouldn't, I use Tools/Code Cleaner/Clean & Convert to CSS?

...When I "Clean & Convert to CSS" lots of things change and the Preview doesn't look fine.


If it's messing things up, then you shouldn't use it.
User 1974115 Photo


Registered User
6 posts

Well, I figured out the culprit re. the two types of doctype's; it was me.

I still have the question about CSS though:

Why should, and why shouldn't, I use Tools/Code Cleaner/Clean & Convert to CSS?

My website pages look OK in Preview, and testing with a Default Browser (haven't uploaded tomy Browser yet).

Using "Clean & Convert to CSS" changes the Doctype from "Transitional" to "Strict"; and brings up a whole different array of (W3 Validation)errors.


User 463058 Photo


Ambassador
1,075 posts
Online Now

If a website is older and uses font tags for styling text, "Convert to CSS" will remove the font tags and replace them with spans with styling that produces the same look. It also converts inline styling to embedded styling.

So, it might help if you are trying to bring an old website up to present standards.

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.