Modifying Dreamweaver to Produce Valid XHTML

by Carrie Bickner

118 Reader Comments

Back to the Article
  1. Not elitist, just practical. I consider Dreamweaver painfully slow, and WYSIWYG editors in general to be so buggy as to not be worth the effort. It’s quicker and easier for me to knock out the code myself than trudge through a sluggish WYSIWYG editor and then slog through its code fixing its numerous mistakes. Dreamweaver and FrontPage are both better than they used to be, but neither of them is as good as I am… yet.

    Your mileage may vary.

    Copy & paste the code below to embed this comment.
  2. Oh, and I use TextPad for day-to-day coding, in case you’re curious. It’s the best text editor I have ever tried. Well worth the miniscule cost.

    Copy & paste the code below to embed this comment.
  3. Any tips on how to do some similar hacks in HomeSite? Especially entities and special characters? Any suggestions welcome!


    Copy & paste the code below to embed this comment.
  4. Hello everyone.
    I have been interested in converting some pages to XHTML for some time, and I know how. That is not the problem. Dreamweaver rewrites nowrap=“nowrap”, selected=“selected” and other similar attributes to the normal nowrap and selected. I use Dreamweaver to save time on initial preparation and manage my site; I clean up by hand. I have not gone over to XHTML yet because I haven’t yet figured out hot to get around this.

    I am now using Dreamweaver MX Trial, but if you don’t know how to do it in MX I would still like to learn how to do it in 4. Thank you, everyone, in advance for any advise you can offer on this matter.

    Copy & paste the code below to embed this comment.
  5. Going back through the posts and reading them I see many people bashing designers that use Dreamweaver. I type over 70wpm and can hand code in my sleep, but guess what? Dreamweaver saves me time anyway. We are not talking about a few minutes here; we are talking about hours upon hours of work. Its site management features like library items have saved me days on updates and allowed me to use great layouts that I would have normally decided against.

    All I can say is this. If you think Dreamweaver will slow you down then you probably don’t know how to use Dreamweaver.

    Copy & paste the code below to embed this comment.
  6. Anybody have any ideas why I can change the
    tag to
    in Line Break.htm (according to Carrie’s instructions on A List Apart) but the tag appears as
    when I use it in a new document in Dreamweaver?

    Copy & paste the code below to embed this comment.
  7. Alot of people think that dreamweaver is a cheap way to enhance your site, and anyone who uses it is slow and opposing the normal conventions of site building.
    Well, this is what i have for them, although dreamweaver maybe a shortcut through all the work u have to do without it, on notepad or another html accepting file, it is much faster and easier. Yes, building a site is no accomplishment now when you hav this kind of sofware which makes it a breeze for u, and those who do it manually writing html from scratch, may think they r being cheated. And i agree, because i used to write it by hand, but times change, you’ve gotto move on, and thats wot i did.
    i didnt think i’d find dreamweaver that useful, but i did, its great, so easy to make sites within minutes and editing couldnt be made easier.

    I recently got the mx version, but i need a crack for it, if any1 finds 1 that works, then please send it to me. at my email, and puttin the the subject area, ‘DREAMWEVER CRACK’, so i recongnise it, cos i get alot of junk stuff.

    Copy & paste the code below to embed this comment.
  8. I’ve been trying to tweak my Dreamweaver 3 to conform to
    XHTML per your recommendations. Most of it seems to work
    fine, but when I’m saving a new HTML file I get the following 2 errors:

    While executing onLoad, the following JavaScript errors
    At line 11 of “xhtml_beforeSave.htm”
    dreamweaver.getDocumentDOM(‘document’).getParseMode() is not a function.

    While executing onLoad, the following JavaScript errors
    At line 11 of “xhtml_afterSave.htm”
    is not a function.

    Is there a way to fix this? The pages seem to come out alright
    and they even validate, but I would like to get rid of the

    Copy & paste the code below to embed this comment.
  9. This is in response to Quasidandy’s post re: the Image Tag Editor in HomeSite.

    In HomeSite 5.0, it is possible to create XHTML-compliant <img> tags, using the Image Tag Editor, but you have to first set the doctype as XHTML in HomeSite in order for it to work properly.

    Even though you may have a valid XHTML DTD at the beginning of your page, you still need to set the doctype to XHTML. To do that, select “Options” from the menubar. At the bottom of the menu is an option to “Set Document as XHTML”. Once you select that option, a dialog box will appear, notifying you of your selection, and asking you if you want to change your DTD to Strict, Transitional or Frameset (or no change at all).

    Once you’ve done that, go ahead and try the Image Tag Editor again. Now, you’ll see different options for the tag (including a few for accessibility). The output from the Tag Editor will also be XHTML-compliant (quoted attributes, the final forward slash at the end, etc.).

    Hope this helps (assuming you haven’t got an answer already, that is ;) )

    Copy & paste the code below to embed this comment.
  10. It only took 4 months for anyone to notice my extension no longer works in DW3? (Shame on me for using an undocumented function)

    It can’t be doing anything at all in DW3 as getParseMode() is checked in the main function. The way to fix it is to uninstall the extension and give me a day or three to think up an alternative for DW3.

    Copy & paste the code below to embed this comment.
  11. Hi,

    Just wanted to thank you for replying regarding my attempts to tweak DW3. I’ll certainly give you all the time you need :) I’ll check back at the site to see if you come up with a fix regarding that.

    I suppose I could just upgrade to DW-MX, but I don’t have the dinero. $200 buck is a lot of money for me right now. If you come up with something I’ll be anxiously waiting as I’ve been very happy with version 3 of Dreamweaver. I’m used to it so I can jump around on it pretty quickly. Meanwhile, I’ll uninstall the extension.

    By the way, the NEWEST version of the extension manager (1.5) doesn’t even work on DW3. I had to re-install a previous version that I had sitting around on my hard drive.
    DW3 users need to note that.
    Planned obsolescence or progress?? Either way, whatcha’ gonna’ do?

    Frankly, I tried the Dreamweaver MX version on my humble little PC (900MHz-256 RAM) and it was sluggish. Huge file download, too.

    Anyway, sorry to ramble on, all the best,

    Copy & paste the code below to embed this comment.
  12. After reading all the “ping-pong” messages about WYSIWYG editors like Dreamweaver vs Hand Coding I’m just wondering what would be like if we hear the client’s opinion on the subject.?
    I know that some clients don’t even care if your computer is a 286 and you work in the old “EDIT” from DOS as long as they see what they want. The issue here is how would the client feel (confidence wise) after finding out the tools the person in charge of the website uses. ( I’ll refer as “person” to the individual “creating”, “developing” or “designing” the website. Don’t want to hurt any feelings and start another message war just because I called “designer” to somebody who considers h**self a “developer”).

    I think that my point is, after you spent hours creating the website and is out there for the public to see, and it looks, feels professional. Would they even care what tool you used??.

    On the subject. I think that some people haven’t used DW enough to see the actual advantages over manual coding. There are some things that you can’t do with editors like Notepad or Textpad(personally one of my favorites). And don’t start making those faces because I’m not talking page-wise but site-wise.

    • DW allows you to collaborate in one common project when you have a group not an individual working on the site.Do you have “checkin-check out” features in Textpad?.
    • Templates are definitly a time-saver. Doesn’t matter if you are the fastest coder in the planet you won’t change 50 pages with a broken link faster than DW. Using DW (provided you’ve used Templates )change the
      broken link once and that’s it every page related to that Template gets updated.
    • Design Notes have proven to be a “nice” feature, not essential but helpful, yeah you can have 3000 yellow sticky notes around your monitor reminding you what to do but I rather have this feature specially if you are working with a group of people…

    Just one last note.. if you are going to reply please do in a professional manner no need to send anybody anywhere or bring up body parts in the message. After all what is the client going to think of you if you present yourself that way???
    Have fun..

    Copy & paste the code below to embed this comment.
  13. There’s an easier way to do the keyboard shortcuts with DW4 – Edit > Keyboard shortcuts…

    No need to muck around with Dreamweaver menu.xml file – you can replace your Ctrl+B <b> shortcuts with <strong> just by pressing the buttons and clicking ‘change’.

    Very simple and no danger to corrupting the XML file.

    I not sure if this feature is in earlier versions of DW, but it’s in DW4+.

    - Mal

    Copy & paste the code below to embed this comment.
  14. </rant>

    Copy & paste the code below to embed this comment.
  15. Any one know where I can get a Dreamweaver MX crack- I really have to get it!

    Copy & paste the code below to embed this comment.
  16. There’s nothing wrong with using Dreamweaver, or whatever tool works to get the job done. If you’re a non-technical person, or anyone who is pressed for time on a project, a tool that helps you build the best looking and working site possible in the least amount of time is exactly the thing. By all means, use Dreamweaver, Frontpage, whatever. They may not always generate the cleanest code or give you maximum control, but hey, we’re not painting the Sistine Chapel, or some great work of art designed to last for generations. We’re building WEB SITES for heaven’s sake, transient things that are here today and gone tomorrow, designed to look cool today and destined to become stale by tomorrow. Why spend weeks or months crafting the “perfect” page or site with perfect html and maximum control, if you can build a cooler looking and more functional site in a matter of hours with a tool? Some people can code like lightning in a text editor, but let’s face it, that’s a minority, and for most folks, a tool like Dreamweaver is exactly what they need.

    Now having said all that to avoid the charges of “elitism”, I do think that if you’re a serious programmer who makes your living as a software developer, you need to give some careful consideration whether to use Dreamweaver, even as slick as MX is. As a programmer, you have a different set of needs than web designers (who focus on the visual issues, graphics, layout, site navigation, etc.), business users, and other folks who just want to crank something out. When you need to have maximum custom control over code, you need to know what it’s doing, and why it’s doing it. You don’t want a bunch of little graphical widgit thingies coming between you and the raw code, no matter how convenient or clever they are. You want access to the raw code.

    Now someone might argue, well you can do that in Dreamweaver MX, and it’s got the new combined features of Ultradev and HomeSite to let you do stuff that keeps you closer to the code. It’s got tag libraries, syntax highlighting, and all the rest. Yes, but it doesn’t have the degree of control over your programming environment that you’d want in a serious editing tool. It’s got a FEW of those things, but in reality I have a $30 text editor, Ultraedit, that has more programming tools than Dreamweaver (which weighs in at around $350 street price). It has the ability to convert between encodings (UTF8, ASCII, Unicode, etc.). It has the ability to interface with external programming tools such as compilers. It has all the things Dreamweaver has, such as snippet library, custom tag libraries, and syntax highlighting.

    As a dev, all the ready-made stuff you pay for in Dreamweaver isn’t that useful. Sure it has canned javascripts, but you can get oodles of those for free all over the web. So it has html syntax checking; that’s a joke, how hard is html for a developer? There are free reference sites all over the web; who needs all the hand-holding built into Dreamweaver? So it does fancy things like layout regions using tables, that can then be reused throughout a site. For a dev, how hard is it to do a server-side include, or better yet, develep some reusable code on the server to generate the common content automatically. And if you do this yourself, you have maximum customisability, unlike with the canned Dreamweaver stuff. Dreamweaver’s a nice tool, but for a dev, I think you can do better.

    I won’t condemn anyone for using Dreamweaver, but I think a serious dev should consider looking elsewhere, and I plan to.

    Copy & paste the code below to embed this comment.
  17. I’ve been roughing out my site
    m/members/rebelgt , and I was looking at it on my friends Mac running OS X. The wierd thing is, when I look at it on his comp, it won’t show the drop down menu in the javascript window. But if I open up the page on its own, [
    m/members/rebelgt ] it shows it with out a prob. Any insight would be much appreciated. :)

    Copy & paste the code below to embed this comment.
  18. Go to Start -> :: Run Then type in REGEDIT :: Now, Go Macromedia and delete the Dreamweaver portion of the folder :: Next, go to the top of the folders list and select HKEY_LOCAL_MACHINE :: Now, delete the Dreamweaver portion again. Finally open Dreamweaver MX and type in your name, ignore Organization, and copy-and-paste this in the serial: DWW600-54020-05455-61816 :: This WILL work.

    Copy & paste the code below to embed this comment.
  19. Didn’t work for me!

    Copy & paste the code below to embed this comment.
  20. Shya, right, Dude Killa. I’d really like to know how DM slows you down. It’s not a crutch if you know how to write valid code AND know how to use DM: it’s jet-powered rocket coder. But, I see you still prefer you horse and buggy. Though protests too much. If you are the stone cold hard coder you say you are, you’d benefit from the speed and convenience of DM (if you’d bother learning to use it correctly, know it’s strengths/weaknesses), because you, with your knowledge of specs, would turn DM into text-editor times 10.

    Many designers, myself included, use DM and produce clean mark-up, and we do it faster. DM’s editing window allows someone who is conversant with the specs to write clean html/xhtml, and, if you know the specs it’s not necessary to code clean.

    So, really if you know DM, and you know the specs, you’re in the fast-AND-clean lane.

    BTY: I’m glad the Web has some diversity, some color, and elements of design. If it were up to the self-elected over-inflated vociferous self-proclaimed “purists”, the Web would still be text based. Sure, information is nice, but information that is designed is nicer.


    Copy & paste the code below to embed this comment.
  21. Is there a mistake in the dates posted for each message or is this the type of dating where its day/month/year and nothing has been posted since April.

    Copy & paste the code below to embed this comment.
  22. all this chat just goes to show how good it really is I think I might buy it with all the bells n whistles.

    Copy & paste the code below to embed this comment.
  23. I just wanted to post some updates to the article for DWMX

    1. Valid Default Document New Path: c:\program files\macromedia\dreamweavermx\DocumentTypes\NewDocumentsThe just edit the one you want.

    2. closing image tag: same file but different lines
    New lines: 24 and 27

    The current information in the article about eding the html files in Forms, Frames, etc…. is still current.

    Copy & paste the code below to embed this comment.
  24. Remove the 30 day / VBox shit from the trial version.

    1. Run regedit.
    2. Navigate to HKEY_LOCAL_MACHINE > SOFTWARE > Macromedia.
    3. Completely delete the Dreamweaver folder and subsequent keys.
    4. Exit regedit and launch Dreamweaver.
    5. Should the VBox screen reappear, click Try, else:
    6. Fill in First Name, Surname and enter a random serial from this file:
    8. [Probs with link? Navigate to]
    8. Enjoy!

    Copy & paste the code below to embed this comment.
  25. Oh! Oh! I feel like I’ve died & gone to Heaven! I’ve finally stumbled upon a group of people discussing just the same type stuff I need to know! I’ve got questions for y’all coming up!

    But, to respond to this topic, I’ve been putting together a site & converting another to DWMX, using many templates & library items in both. So far, the only negative I’ve found has been one annoying but manageable issue with the templates.

    Sometimes DWMX allows you to insert & save some bad code it really doesn’t like, but doesn’t tell you until you discover it yourself & try to correct the problem (like a missing close tag or something). When you try to make the correction, the template gets a bit confused & thinks you’re trying to change something in an “uneditable” region. My only successful methods of rectifying the situation have been to undo, undo… until I get back to the place I made the original mistake (this works sometimes & sometimes not) or to use the method recommended by one of the DW consultants from the DW site forum which is to open the pg in a different editor (I’ve just used Notepad, but the tabs can make it quite hard to locate what you’re looking for), make the correction & save it, then reopen the pg in DWMX. You can see the full discussion on this issue at…

    I found that this was less of an annoyance when I turned off the 3 Preference/Code Rewriting/Rewrite Code options.

    Otherwise, I’d have to say my experience so far has been that templates/nested templates & library items RULE! You see a minor change, you make it to the template, &, bam, in a few secs all your pgs are changed. Don’t like the change; remove it from the template, save, & it’s gone from all pgs. Same with the library items for such as dates, amounts, counts. (Note: The Library seems to get a little confused about iitself every once in a while & sort of think it doesn’t exist or an item name remains when the item has really already been deleted. I’ve always been able to resolve this “fake prob” by Recreating the Site Cache & Refreshing the Library until either all the items reappear or the names of the deleted ones no longer appear).

    I surely hope nothing more negative shows up with ‘em as they truly make site-wide updating a snap.

    Copy & paste the code below to embed this comment.
  26. I do think too that people bashing WYSIWYG users are somewhat arrogant. And they miss the point anyway. It’s not about having all the work done for you, it’s (as James stated) about TIME.

    Would any of you say: “don’t use a text processing software to produce long documents, but instead start typing all the attributes and styles in a text editor, then render it in some other software”? Uh? No, of course. So why on earth should HTML be an exception in this? Very funny.

    I can write code, too, and have a fairly high typing speed.

    But between the average 10 minutes I take to determine page layout and CSS via Dreameaver, + the 10 minutes of code verification/correction, and the full 1 hour it takes to do the same in raw typing, well, I’ve choosen.

    Matching, in a text editor, the time one takes in DW to build layout and CSS is possible only with very simple layouts, with more than 80% informational contents.

    Another consideration is that when you come from PAO, your working habits are very different than when you come from the programming world. For programmers, writing code is the “natural” way. For PAO designers, actually SEEING what you are doing is the “natural” way. It’s a whole different approach.

    I personnaly can tell, most of the time, the difference between a site designed by someone who is into PAO and someone who’s on the programming side…

    I DO understand the points of those guys who claim that, FOR THEM, using text editors is better. Sure it can be. But some of them are indeed arrogant, and should think twice before making nonsense declarations. I think they simply deny the right to “traditional” designers to play a role in the web community, and dream of a web directed only by programmers, “people who KNOW about languages”. To me, it doesn’t sound very democratic.

    Cheers from Belgium :-)

    Copy & paste the code below to embed this comment.
  27. somebody’s got code envy ^^

    Copy & paste the code below to embed this comment.
  28. shouldn’t the posts be in reverse order? i had to click next, next, next just to get to today. seems wierd to me.

    Copy & paste the code below to embed this comment.
  29. MX seems to have fixed all.. well almost. you can set all of the afore mentioned changes in prefrences except the
    and <img> to <img > but you can still do this in TagChooser.xml. Someone said somewhere that the special character incoding is wrong and also the flash code is updated but still dosn’t validate so we are still stuck with the flash satay (what is satay) method. woo hoo! im happy it even does good code formating! COOL!

    Copy & paste the code below to embed this comment.
  30. Dreamweaver, has since v4 offered a feature by which certain sections of code are translated. This includes the php

    < ? php include(‘header.php’); ?>

    which i use to inclue the header you see above. problem is dreamweaver interprets this as an ssi and decides to translate this to the source found in the local copy of the file, no matter how out of date.

    Copy & paste the code below to embed this comment.
  31. and for macromedia dreamweaver 6.1 any 1 knows where can i get the crack?

    Copy & paste the code below to embed this comment.
  32. In DW4. In code mode I try editing Javascript code like MouseOver, OnChange, etc, and change them to all lower case.
    They look OK but then they always revert back to their original.
    I’m trying to validate as XHTML.
    Anyone else seen this?
    Any fixes??
    email me


    Copy & paste the code below to embed this comment.
  33. Dreamweaver keeps rewriting my javascript events as such:
    onmouseover = onMouseOver

    this is keeps my page from validating…

    is there anyway to stop Dreamweaver from doing this?

    Copy & paste the code below to embed this comment.
  34. I create site models in XML, generate the site (with XSLT) and then fill in the content in a WYSIWYG (using FP2002). Now I’m trying to round-trip the content back into the XML.

    Problem: the HTML generated in FP2002 is not XHTML compliant by far, so the round-trip screws up my XML something wonderful.

    Any suggestions for a nice (cheap) page WYSIWYG for XHTML? No site features required (except maybe publishing)?


    Copy & paste the code below to embed this comment.
  35. Dreamweaver MX trial version expired and I’ve tried everything to rejuvenate it with no luck. There is obviously some hidden file that prevents me from re-downloading a fresh trial version and the old one won’t launch anymore. Any suggestions? (I’ve tried the suggestions above for changing a trial version to full but it doesn’t seem to work once the 30 day trial version has expired)

    Copy & paste the code below to embed this comment.
  36. Hi,

    DMX keeps messing with my PHP Code even if my settings seem correct. If you have a few minutes, please check my post:


    Copy & paste the code below to embed this comment.
  37. great little article this, now i don’t need to buy dwMX….oh how i like my dreamweaver 3 :)….thanks again! scott

    Copy & paste the code below to embed this comment.
  38. dsss

    Copy & paste the code below to embed this comment.
  39. anyone know how to crack Dreamweaver MX 6.1 for MAC??? THANKSSSSS.

    Copy & paste the code below to embed this comment.
  40. Is the appropriate extension for an XHTML file .xhtml or .xht or what?

    Copy & paste the code below to embed this comment.
  41. I keep finding the question, but have never found the answer. I use DW for the templates and management etc. I hand code in code view, but DW won’t leave certain attributes well enough alone.

    It keeps changing selected=“selected” back to selected

    How do I get it to stop that?


    Copy & paste the code below to embed this comment.
  42. ckrack Dreamweaver MX 6.1 for MAC?

    Copy & paste the code below to embed this comment.
  43. I’ve just read that comment tags in XHTML have to be done differently using CDATA or something – it’s still a little fuzzy. Anyway, DMX uses comment tags for its templates with no CDATA thingummy so doesn’t that mean all pages produced by a DMX template are NOT valid XHTML? Anybody know what I’m talking about?

    Copy & paste the code below to embed this comment.
  44. <bold> I want a dreamweaver mx trial version crack for my mac</bold>

    Copy & paste the code below to embed this comment.
  45. Hello,

    I was just wondering if A list a part is going to publish a guide how to make these same tweaks in DW MX 2004. Atleast the doctype doesn’t change by editing the default.html anymore. I’m using a mac with DW MX 2004.

    Copy & paste the code below to embed this comment.
  46. The modifications to Dreamweaver to produce valid XHTML, do they apply to Dreamweaver MX as well or only the previous versions: 4,3..?

    Copy & paste the code below to embed this comment.
  47. does anybody know where to get the crack for dreamweaver MX for osx?
    if you please let me know thanks

    Copy & paste the code below to embed this comment.
  48. Does anyone know of a program that does automatic XHTML? If there is not one out yet, is there anyone who wants some XHTML work to do? email me to get started. I have paypal and pay very well!

    Copy & paste the code below to embed this comment.