Forum Moderators: open
Will work out why all the tags have come onto the pages, then will report back.
How messy can Wysiwyg's make your code
<p><font color="#339966" size="2" face="Trebuchet MS"><strong><font face="Geneva, Arial, Helvetica, san-serif"><a href="widgets.html">Widgets
from WidgetCity</a><sup><font color="#1458AB">®</font></sup></font></strong></font><font face="Geneva, Arial, Helvetica, san-serif"><br>
<font size="2">Enjoy the convenience of online widgets from WidgetCity<sup><font size="1">®</font></sup></font></font></p>
I never did get my head around this one. Lost count of the font tags somewhere along the line. ;)
I've been advised it's not untypical of what Dreamweaver will do with an inexperienced operator. Too bad the board removes spaces, so I can't show how the lines are indented after they're arbitarily chopped up.
Let me get this straight; you took an innocent site, dragged it into FP, and from there into DW? I don't know if DW has the same habit of "correcting code" as FP has, but i would suspect that two wysiwyg editors would add some to the confusion.
Robert Charlton
- very nice example, i think the Trebuchet is just a default that is never used anyway. Still, all the other code gets nested into it... logical, but not nice.
I think the problem is that wysi.. graphical editors record all user actions, desired as undesired, i've even seen something like <b></b><b></b><i>italic</i> because the text should not be bold and then it should and then it should be in italics (don't remember the exact syntax though). And then there's all the prorietary code on top, and the plain errors. It seems to me, that "what you see" is only a small fraction of "what you get", as you inevitably get a lot of unwanted stuff on top of what you wanted.
In other discussions on this topic (outside WW) i've seen results down to 1/3 of the original file size when removing the code bits that didn't add value to the page. I do not use such editors myself (at least not for anything even close to publishing), but i don't condemn them, as they are useful for some purposes, eg. in prototyping, visualisations, mock-ups etc.
/claus
claus's fourth paragraph is absolutely right - that's what DW does if you add in <b> tags and <font> tags and then take them out again. Which of course begs the question of why one is doing that in the first place.
You can also drive a Ferrari at 120mph in first gear...
On the other hand, DWMX can be and is used to produce clean compliant code using CSS-P and validated for accessibility and correct code with very few problems from within the programme and I would challenge anyone to remove "unnecessary code" from those pages.
In FrontPage 2002, you can do this as follows:
1) From the "Tools" menu, select "Page Options."
2) A dialogue box will display. Select the "HTML Source" tab and check the box that reads "Preserve existing HTML." (The other option, "Reformat using the rules below," is for users who want to impose a specific HTML formatting style.)
Then take it one step further by viewing the page in normal view. Select All (Ctrl + A) and then Remove Formatting (Ctrl + Shift + Z). This will strip all of the html styling markup and leave you with the raw code. There is an optional way to do this in html view. Right click the page and select Reformat HTML to apply your new rules. You can also apply XML formatting rules.
Then there is the process of applying that formatting back to the elements. Typically what I do is the plan the style sheet in advance. That way I can methodically work from the top to the bottom of the page and apply styles using a combination of the FP styling menu and working in html view (hand coding).
Give me a page with the hundreds of usual errors and I'll have it validated strict in less than 30 minutes. Most of the time anyway. ;)
P.S. Once you've cleaned everything up, you can double check yourself by viewing the page in normal view and Reveal All (Ctrl + /) which shows you all the html tags (starting and ending) and anything inbetween. One other feature you should always have enabled Show All (Ctrl + Shift + *).
i have heard of these magical things that one can do about cleaning up dreamweaver code, but can never remember what. can anyone point me in a direction to find these commands? thanks.
-Matt
It is entirely and eminently possible to use DW without producing a mess - the fact that people do produce a mess has to do with their lack of fairly basic skills more than the programme itself.
In answer to your question, look under Commands - Clean Up HTML/XHTML and you will find plenty of options there.
just to clear up my previous post:
i am talking about what claus and you were pointing out in the upper posts.... how if you do everything in design mode, a lot of excess tags get thrown in.
i agree that the mess is caused by ignorance, and that you shouldn't expect the world from a designer. but, c'mon, can't a person dream? :)
thanks for your help, also.
-Matt