Forum Moderators: open

Message Too Old, No Replies

W3C DTD and html validation

Using authoring tools like dreamweaver still fails W3C

         

tenerifejim

4:57 pm on Mar 10, 2004 (gmt 0)

10+ Year Member



All,

I have been using dreamweaver for sometime now to generate html for my web applications. But have only just realised that it is neither strict nor loose w3c compliant html 4.

One of the main areas of contention seems to be the embedding of flash objects. Does anyone know if the w3C allows for these tags or are they just browser specific? What is the best DOCTYPE to use? Any other advice as I've never really bother to look into this before.

Jim.

tedster

6:32 pm on Mar 10, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This thread should give you a good approach:

[webmasterworld.com...]

DrDoc

7:47 pm on Mar 10, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



As far as other advise goes -- do not use a WYSIWYG editor :)

Purple Martin

11:14 pm on Mar 10, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What version of Dreamweaver are you using? I know that Dreamweaver 4 code is very bad re compliance, and Dreamweaver MX code is better but still not great.

I've heard Macromedia claim that MX 2004 is very compliant - I'd be interested to hear if people's experiences can confirm this.

DrDoc

11:41 pm on Mar 10, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



MX 2004 is really good...
Just don't use it in WYSIWYG mode.

tenerifejim

9:27 am on Mar 11, 2004 (gmt 0)

10+ Year Member



Not using dreamweaver is not an option. I simply don't have time to hand code and when I check the majority of my code it seems 'mostly' compliant. As for flash object embedding, that seems like a whole can of worms without really solving anything.

If my end users aren't having any problems, apart from search engines, what other real benefit do I get from valid code? Particularly as Google isn't having any problem spidering my site, or the links in my flash files.

TGecho

3:06 pm on Mar 11, 2004 (gmt 0)

10+ Year Member



It mostly depends on what sort of invalid code you're talking about. Missing a few alt attributes probably won't hurt you, but improperly nesting tags could be very unpredictable depending on the browser.

g1smd

10:18 pm on Mar 12, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Do a Google search for the flashsatay article.

tenerifejim

11:32 pm on Mar 12, 2004 (gmt 0)

10+ Year Member



I test all my code in IE4 and NN 5 upwards, I've never had a problem and no one has ever reported difficulties. I think I'm going to stick with code that isn't valid. As long as it works and I can do it quickly, I don't see any reason to change.

Unless someone can give me any better reason?

isitreal

1:40 am on Mar 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



As long as it works and I can do it quickly, I don't see any reason to change.

That's about the size of it, valid code doesn't really make much difference except for debugging questions, especially if no one else is ever going to be maintaining your code. If you know what the errors are and why they are there it's all the really matters I think. If on the other hand you have lots of errors and don't know what they are, that's a problem.

I'd personally question that dreamweaver is faster than handcoding, I think that's an illusion they like to sell users, if you have a good text editor with lots of features all you're usually doing is cut and pasting and putting in blocks of code anyway, that's assuming you know html of course. Obviously it's way faster for people who don't know html.

brucec

4:33 am on Mar 13, 2004 (gmt 0)

10+ Year Member



Jim said:
I test all my code in IE4 and NN 5 upwards, I've never had a problem and no one has ever reported difficulties. I think I'm going to stick with code that isn't valid. As long as it works and I can do it quickly, I don't see any reason to change.
Unless someone can give me any better reason?

Be careful with that Jim, sometime in the near future, XHTML is going to replace HTML and web browsers will be supporting is and not invalid HTML. I am not talking about XML, but XHTML.

I think it is best to get into the habit of using valid HTML now. Just for the record, I have been getting into the valid HTML for over 6 months now and it is rough since I have been had coding HTML for 8 years now.

Both Frontpage and Dreamweaver stink for valid HTML.

Also remember that just becuase the web page loads fine in Netscape or IE, it does not mean your HTML is valid. It just means that those browsers are more forgiving of valid and sloppy HTML.

Microsoft will catch up soon. My suggestion to you is to get away from Dreamweaver and Frontpage. They are more trouble than they seem. :)

You asked for a reason. LOL

isitreal

6:45 am on Mar 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



ometime in the near future, XHTML is going to replace HTML and web browsers will be supporting is and not invalid HTML. I am not talking about XML, but XHTML.

I seriously doubt this is true, sorry. No browser maker in their right mind is going to throw out the 4 billion plus web pages currently up on the internet, most either error filled html 2, 3.2, or 4, or simply undeclared doctype. Where do you get these ideas from? Can you site any sources to back up this claim? How would they explain this to their users? I know, they'll tell them that the pages don't validate so they can't see them anymore. Somehow I doubt that will happen, now, in the near future, or in the far future.

In fact, if you actually think about it, computers are going to keep getting faster, software like browsers are going to keep getting bigger, so there's really pretty much zero motivation for browser makers to to suddenly stop building in all that error correction that is needed to display bad markup correctly, it's already in the code base, so why suddenly throw it out? MSIE is the last I'd ever expect to do that, they are catering to average users, and average users don't care if the code is bad as long as the page works and they can order their thing or see the pictures they want to see.

Not that I disagree with anything else you said. Writing error free code is actually in a way easier, especially in the long run, it's easier to maintain, easier to fix if someone else breaks it, and just looks nicer. Using wysiwyg editors just keeps you from learning how to code properly, it's not faster, not in the long run anyway (have you ever tried fixing a dreamweaver or frontpage site? it takes longer than it would to rewrite it, by hand...), it's just a way to throw something up as quickly as possible and not really having to worry about the results.

Eric_Jarvis

7:41 am on Mar 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



isitreal: "I'd personally question that dreamweaver is faster than handcoding, I think that's an illusion they like to sell users, if you have a good text editor with lots of features all you're usually doing is cut and pasting and putting in blocks of code anyway, that's assuming you know html of course. Obviously it's way faster for people who don't know html."

the key isn't so much knowing html and having a well thought out and efficient design process...if you start by organising what you'll need in terms of SEO, accessibility and the other structural aspects of a site, then marking up the html at the same time as doing them is pretty trivial and overall means that mark up barely takes any time at all...with a less well thought out process then it might seem to make sense to use software to generate the html

I did a newsgroup post a few days ago detailing the steps from being contracted to delivering a finished site...10 stages...one of which featured marking up the content and one of which featured marking up a template...both stages that were largely to do with other aspects of creating the site...for me doing mark up is a tiny proportion of the job...but it's fairly obvious other people use very different processes

DrDoc

4:40 pm on Mar 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I agree with you, Eric. Adding markup is just as natural as beginning each sentence with a letter in caps.

"Oh, here's a new paragraph. Ctrl-P. Oh, here's a new heading. Ctrl+Alt+heading_size. Oh, here's a new link. Ctrl-Shift-A..." I almost never think of actually adding the markup. I just do it!

True, I am still using an editor with WYSIWYG capabilities (HomeSite). However, I never use the WYSIWYG interface. It would be a waste of time. Instead, I hand code the page, then preview in the browser. ...five, to six times faster than letting the editor do the job. I use the editor for what it's good at -- color coding. Plus, I can assign shortcuts to whatever I want.

For example, as soon as I type <? it automatically adds the end tag?>. Typing <% adds %>. Plust I get only the markup I have specifically asked for, exactly where I want it. No need to go back and skim through the markup to make sure it looks ok.

And, don't give me the argument about the split pane in MX 2004. It's still a waste of time. It's great for those who can't visualize what the markup will actually look like. But once you've come to that point -- anything but handcoding is going to take extra time.

Bonusbana

5:38 pm on Mar 13, 2004 (gmt 0)

10+ Year Member



tenerifejim, I think you should stick to Dreamweaver and non-valid code if quantity is your thing and you dont produce large heavy-content sites. Most browsers read it and 99.9% of the end users care more about content and if the site visually attracive.

Dont get this wrong - I spend a lot of time trying to make the perfect code and 100% valid xhtml, I think its worth it in the long run. Separating content from design is a great thing, making future design upgrades and database integration much easier.

Having your sites hand-coded, clean, smart and fully compilant with the current web standards has many other advantages; people with disabilities can use the site, the site gets a lot lighter meaning less bandwidth cost and faster loading, just to mention a few. Not to forget the massive respect you gain in the webdesign community...

But every designer is different, and I dont expect everybody to be hopeless perfectionists. What I suggest though, is that you cooperate with somebody who knows the xhtml thing. You make the layered photoshop sketches and some semantic structures, and your partner does the coding. Working together is a good thing.

g1smd

8:37 pm on Mar 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Writing valid code is NOT rocket science.

To "learn" HTML you need to know what about 20 tags do, their attributes, and acceptable values.

In correcting validation errors in over 1000 websites in the last few years, I know that over 99% of all the errors are the same dozen or so errors, every single time.

Once you know about the 20 standard tags and their attributes, and know how to correct the dozen common mistakes, you can do virtually anything.

tenerifejim

12:53 pm on Mar 14, 2004 (gmt 0)

10+ Year Member



Hmm, quite a bit to think about.

It seems that most people have a dim view of dreamweaver and the like. I've never been a massive fan of bad practice, but my sites are large and content heavy. I have two or three non-technical invididuals who perform updating tasks and they find it much easier to use something similar to what they already know (ie. Word) to produce their content.

Also, I am aware of erroneous coding, I don't ever use the rollover and other such code. I generally just use the wysiwyg for layout (so mainly table) purposes which I then clean up.
I use css for most of the other stuff.

I think I'll just carry on until I find that there is a major impact on the work I do. The fact that 1 or 2 percent can't use my site is not a big enough margin to justify change.

As for future proofing. Microsoft have never been ones to comply by any error checking rules, I don't see why they would start now XHTML or no XHTML. And if I was user of netscape and found it wouldn't show some pages correctly but IE did, then I know which browser I would end up using.

I think we need to remember that the end user doesn't care what underlies the webpage or browser as long as he can order his DVDs and book his flights.

Thanks for all the feedback though.

ronin

7:00 pm on Mar 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I think we need to remember that the end user doesn't care what underlies the webpage or browser as long as he can order his DVDs and book his flights.

True. But if each page downloads 2 seconds more quickly than it used to because the browser doesn't have to go into quirks mode to figure out how to render the code, the end user will feel happier about visiting the site... though they themselves probably won't know why.

And blind people who use screenreaders probably care a whole lot more about valid markup than sighted people. Listening to random gibberish when you're trying to order a CD can't be much fun.

[edited by: ronin at 7:02 pm (utc) on Mar. 14, 2004]

isitreal

7:01 pm on Mar 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



The comments about blind readers is one I'd like to find out more about. Is there an emulator or something available on the web where you can actually check your pages?

If you are doing large, content heavy site, you should think about using server side scripting like php for a big chunk of the maintainance of the pages, and once you get into using scripting tags on your pages, you definitely don't want to ever use a wysiwyg editor except as drdoc notes for color coding of markup/code, site wide search and replace, that kind of thing. And all good code editors do this, I use dreamweaver only for site management stuff, site search and replace etc, never ever for creating code, not even in text mode, it's useless to me, clumsy, unattractive, bloated, you have to go in and turn off so many default behaviors to get even a halfway decent page out of it that's it's not worth the bother, I use a tiny basic text editor (edit plus) that works perfectly, is totally configurable through text files, and does far more than I've ever used it for.

I think the choice of whether to use html 4 or xhtml 1 is kind of a tossup, it doesn't really matter that much, database driven sites were mentioned, but as far as I can tell you can have the programming output which ever version you want, and html 4 is marginally easier for lower skill site maintainers to keep in decent shape.

But if each page downloads 2 seconds more quickly than it used to because the browser doesn't have to go into quirks mode to figure out how to render the code, the end user will feel happier about visiting the site...

This is a myth, if you stop to think about it browsers are always running in 'quirks' mode, in other words, all pages irregardless of doctype are being rendered with errors, and rendered to correct those errors, which means that all the error catching code is on, at all times, whether or not it's in quirks mode. The only actual difference of being in or out of quirks mode is how it is rendering the page, eg IE 6 will somewhat correctly apply the box model if not in quirks mode. The only possible way a browser could realize that a page was error free before rendering the page would be to read all the code first, to check it for errors, then render it in the proper mode, in other words, it would need to parse the page twice, which would be redundant.

If time to view the page is a major consideration, cut out all formatting type graphics, as much as possible, and optimize the rest as much as possible.

If you keep the css reasonably simple, and the code reasonably clean, you can expect 3-5 seconds over dialup for the first page to load, 1-2 seconds for subsequent pages, once the css/js stuff has loaded into the browser cache.

This performance has nothing to do with error free code, and everything to do with not piling the page full of useless code, not that creating error free pages isn't worthwhile, I never put out any page anymore that doesn't validate as zero error, but that's just me, that puts me probably in the 1-2% of website makers (doubt it's higher than that) who do that.

Bonusbana

7:27 pm on Mar 14, 2004 (gmt 0)

10+ Year Member



Bobby validates your pages for accessibility:

[bobby.watchfire.com...]

If you follow their guidelines, you make it a lot easier for disabled people to read your pages. This is not just a matter of making the site accessible for everyone, in the UK there is a law comming up that all content availible on the internet must be made accessible for people with disabilities.

Besides this, its a nice thing to do for those people.

Adding database content to your site, you will automatically be hand coding much more complicated code than html. Even if you have another programmer to do the database thing, you will have a much smoother production if you do your html using web standards, separating content from design.

tenerifejim

11:53 am on Mar 15, 2004 (gmt 0)

10+ Year Member



Ronin, I accept your argument about blind users. However, as I say, to satisfy 1 or 2 percent is not enough. I am sure there are many other sites that cater to these niche audiences.

The main reason I started this thread was to discuss Flash W3C compliance and we ended up discussing the evils of dreamweaver and wysiwyg. Oh well.

DrDoc

3:45 pm on Mar 15, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



However, as I say, to satisfy 1 or 2 percent is not enough. I am sure there are many other sites that cater to these niche audiences.

I wouldn't call it a "niche"... not when you're going after 100% of the users. Hardcore IE-only fanatics are going after a "niche" -- albeit 75-80% of all users.
If you develop with accessibilty in mind, that means you're not catering for anyone -- you're just making sure the widest audience possible can access and use your site.

In many places it is also a legal requirement (whether you know it or not) that could cost you many customers, not to mention expensive lawsuits.

Blelisa

9:20 pm on Mar 15, 2004 (gmt 0)

10+ Year Member



I use dreamweaver to get my basics put in and than when the client has given the final ok and the site will have no more changes than I go and clean up the code in notepad and get it so that it can be validated.

WeirdoPL

12:40 am on Mar 16, 2004 (gmt 0)

10+ Year Member



The question of when (if ever) to use a WebsiteCreator has a simple answer: NEVER. Recently Kate (my Beloved) tried to creata a layout for her blog in a thing like that (doesn't really matter which editor it was) and it was constantly coming up not the way it should be (nor the way the editor showed it is). Fixing it was easy, but still: if it's not 100% what it should be then why even bother with the crappy editors?

I'd personally question that dreamweaver is faster than handcoding, (...) that's assuming you know html of course. Obviously it's way faster for people who don't know html.

I do all my coding (it's not much, but it's still something) in a blunt notepad ever since I started to code. I'm lousy at it. I'm slow. I get hundreds of errors. But even if the time i'd spend doing it in a WebsiteCreator would be 10 times shorter than the time I spend on handcoding - I'd NEVER use this kind of annoying crap. It's like object programming using pictures and schemes... YUCK!

But that's just my, newbie, oppinion.

vkaryl

2:36 am on Mar 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



TopStylePro does a more than decent job of providing validate-ready code, assuming one has a fair background in html/CSS. I have rarely to "fix" anything IT does - the stuff I have to fix is my own idiocies.... It's what I call a "munge-coder": it has a wysiwyg component, and it has an "insert code" sort of thing. But it doesn't end-rely on either one: it relies on YOU to make sure it's right before you attempt to validate.

The single major component of TSP that makes it invaluable to me (as opposed to Dreamweaver which I also know inside-out) is that it will provide updated CSS without choking from style-blocks already in place. This is a MAJOR timesaver when retrofitting sites. I find DW markedly less friendly in this regard.

As well, writing clean CSS for brand-new pages/sites is infinitely easier in TSP than in anything else I've used.

DW's single major bonus is the built-in *.lbi file markup stuff. But then again, it's a $500+ program - not everyone can afford that, and really, includes of various sorts (SSI, .php etc.) work as well or better....

tenerifejim

12:22 pm on Mar 16, 2004 (gmt 0)

10+ Year Member



DrDoc,

I would love my website to be a nirvana of a website experience open to all. But I live in a world where time is money and maximum return on minimum investment is required. My stuff works fine on IE, Netscape and safari. I can't (and won't) do any more than that.

As for legality, in my industry (timeshare) that last thing I care about is whether my website works for blind people. I'm more worried about 10 day cooling off periods and fraud.

And I'd like to see someone try and sue me in Tenerife... Hold on...

I'm ending up doing what many people seem to do on webmasterworld, ask a question, wait for replies and shoot them all down and carry on as I always have. Damn, I swore I'd never do that.

Bonusbana

2:16 pm on Mar 16, 2004 (gmt 0)

10+ Year Member



Well thats it! You prefer quantity over quality (technical quality with valid code) and thats fine with me. I know the indutry. To return to your original question, there is a way of integrating flash in valid html4 / xhtml but you dont want to go there. www.alistapart.com has an article called flash satay or something like that. Print it out and beach-read it on teneriffe...