Why aren`t all sites compatible with all browsers?

Discussion about the creation of websites in general, HTML, PHP, Java.

Was this information usefull to you?

Yes ,it was.
3
25%
No ,I already know this.
8
66%
No ,I didn`t undersand it.
0
No votes
No ,because I don`t care.
1
8%
 
Total votes : 12

Why aren`t all sites compatible with all browsers?

Postby DjDarkman on Thu Aug 17, 2006 3:37 pm

Why do you think that some webpages aren`t compatible with all webrowsers?
I think there are two possible reasons:
---------->1.The browser doesn`t support the technology that`s used in a webpage
---------->2.The webpage is badly coded and full of coding errors

You probably think that the first is the most common ,then you are wrong ,there are few sites that use technologies that are not supported by all descent browsers ,for example gmail.com ,that uses ajax.Most of the sites that are not compatible with all browsers because of the coding errors ,because most web browsers are designed to get passed the erros ,I`ll show you and example.

Let`s make a badly coded html and see how all other browsers react to it.

This is out badly coded html:
Code: Select all
<html>
<table>
<tr>
<td>1</td><br><tr>2</td>
</tr>
</table>
</html>


Now let`s see what happens if I open it in Opera ,Firefox and Konqueror:

Opera http://djdarkman.phoenix-hosting.org/snap/error1.png
Firefox http://djdarkman.phoenix-hosting.org/snap/error2.png
Konqueror http://djdarkman.phoenix-hosting.org/snap/error3.png

See the difference in Opera "1" is exactly below "2" ,but in Firefox and Konqueror there is a space before "1" ,so it`s not exaclty below "2" ,now if I were an Opera fan ,and didn`t know that this webpage is bad I would say "Firefox and Konqueror is buggy ,it works on Opera so it must be good." or "Firefox and Konqueror isn`t as advanced browser as Opera ,because they both lack technologies that Opera has." and so on ,you probably heard/read some excuses like these yourself.

Ok let`s say that I`m not so good at excuses like these and I know a little html and try to correct it to this:

Code: Select all
<html>
<br>
<table>
<tr>
<td>2</td>
</tr>
<tr>
<td>1</td>
</tr>
</table>
</html>


Now let`s see what happens:

Opera http://djdarkman.phoenix-hosting.org/snap/good1.png
Firefox http://djdarkman.phoenix-hosting.org/snap/good2.png
Konqueror http://djdarkman.phoenix-hosting.org/snap/good3.png

Wow!it looks the same in all browsers ,it looks like I discovered the secret of the univerese ,I made this webpage to be compatible with Firefox and Konqueror too.What did I do?I corrected the code that supposed to display the two numbers and followed the html syntax.

You probably think that this is a good wep page now ,but you`re wrong ,let`s validate it with the w3c validator ,and this is what we get :

Result: Failed validation, 4 errors
File: good.html
Encoding: utf-8
Doctype: (no Doctype found)

You can ask ,how come it has 4 errors if it works on every browser I tested in.Let`s see those errors then:

Code: Select all

Error Line 1 column 0: no document type declaration; implying "<!DOCTYPE HTML SYSTEM>".
<html>

Error Line 2 column 3: document type does not allow element "BR" here.
<br>

Error Line 3 column 6: document type does not allow element "TABLE" here.
<table>

Error Line 11 column 6: end tag for "HTML" which is not finished.
</html>


See ,even a wepage that looks the same in all browsers can have erors.
The best tool to fix these errors is the w3c validator http://validator.w3.org/ ,with it you can correct all errors on your site and it will be compatible with all browsers ,furthermore ,the people in channel #html on the irc.freenode.net IRC network can help you with this ,all you need is a little knowlage of html.

btw: this is not a lame copied blog from somewhere ,you can try o find it ,maybe you will succed ,if google indexes this forum Smile ,I wrote this myself because I saw that nearly all the wepagees in the gallery section of the forum are badly coded ,I hope this helps understand ,why is following the standards of html important.
DjDarkman
Valued Member
Valued Member
 
Posts: 166
Joined: Wed May 24, 2006 9:14 pm

Postby SlicerSV on Thu Aug 17, 2006 6:18 pm

ooh ohh, i know what's wrong! it has no <body> and </body>! also, it really should have a <head> and </head> as well, and that'd be where you put all the cool stuff like the DOCTYPE it's complaining about.

yeah... like... how can people not know this stuff? seriously...
SlicerSV
Contributer
Contributer
 
Posts: 56
Joined: Thu Jun 22, 2006 3:01 pm

Postby Samppa on Thu Aug 17, 2006 7:21 pm

SlicerSV wrote:yeah... like... how can people not know this stuff? seriously...


Can you tell me the specifics of how your stereo works?
Sort of like that.
(\__/)
(='.'=) This is RomMaster's Bunny. Copy and paste bunny into your
(" )_(" ) signature to help him gain world domination.
Samppa
Phoenix Veteran
Phoenix Veteran
 
Posts: 744
Joined: Thu Feb 02, 2006 10:00 am
Location: Finland

Postby DjDarkman on Thu Aug 17, 2006 7:38 pm

SlicerSV wrote:ooh ohh, i know what's wrong! it has no <body> and </body>! also, it really should have a <head> and </head> as well, and that'd be where you put all the cool stuff like the DOCTYPE it's complaining about.

yeah... like... how can people not know this stuff? seriously...

Not every people knows that who has a website ,especialy the doctype.

And this example`s purpose was to illustrate that even websites wich are missing these key elements can run on most of the browsers
DjDarkman
Valued Member
Valued Member
 
Posts: 166
Joined: Wed May 24, 2006 9:14 pm

Postby Rommaster on Thu Aug 17, 2006 8:26 pm

I voted "No ,I already know this." because I already know this and wasn't useful for me. Rolling Eyes
Not that I don't like it or respect it, actually I think it's very good you made this post. It helps the beginning html users to correctly write html pages and also make it compatible with every browser. Good job! Cool
SwiftIRC - irc.swiftirc.net - #phoenix
Phoenix-Network

(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(" )_(" ) signature to help him gain world domination.
Rommaster
Phoenix Veteran
Phoenix Veteran
 
Posts: 960
Joined: Thu Mar 10, 2005 1:05 pm
Location: The Netherlands

Postby DjDarkman on Thu Aug 17, 2006 10:29 pm

Thank you ,I got the idea ,after my posting spree at the gallery Smile ,I saw so many webpages full of errors ,and remembered that I made badly coded webpages myself a few years ago ,when I didn`t know what is the w3c and all that ,and I want everyone to know ,that they can easily create good webpages by just following the simple grammar of html.

If someone has a question about these things I`m willing to answer if it`s in my reach.
DjDarkman
Valued Member
Valued Member
 
Posts: 166
Joined: Wed May 24, 2006 9:14 pm

Postby trick on Fri Aug 25, 2006 3:40 pm

SlicerSV wrote:ooh ohh, i know what's wrong! it has no <body> and </body>! also, it really should have a <head> and </head> as well, and that'd be where you put all the cool stuff like the DOCTYPE it's complaining about.

Actually the proper place to put it is right at the beginning of a document (even before the <html> tag). The exception of course is the XML document which MUST have an XML declaration (<?xml version=1.0" ?>) right at the beginning (not even a space in front of it). In that case the doctype is normally put on the second line.

Note that Internet Explorer 6 and previous has some weird handleing of doctypes and such so you won't want to send it an XML declaration even if you are using XHTML.

SlicerSV wrote:yeah... like... how can people not know this stuff? seriously...

It happens to any emerging field, people enter without taking the time to figure out what's going on. Like the numb-nuts who jumped in airplanes in the 1920's and ended up furthuring the darwinian process. The only difference is that bad programmers don't die -- they get promoted into management.
'The military don't start wars. Politicians start wars' - William Westmoreland
Image
trick
Contributer
Contributer
 
Posts: 74
Joined: Mon Aug 07, 2006 6:07 am

Postby arn0ld on Fri Aug 25, 2006 9:07 pm

Uhm... Nice article.. I've been reading about validating codes and stuffs.. I have my site validated (the .html and .css file) unfortunately it doesn't look the same on all browsers.. I think the problem is on my css file.. Like the attribute padding, the gaps added on IE are much bigger compared to FF.. Am I correct?

If so, are there other attributes that are validated but then look different on other browsers? And is there a solution for this?

Thanks Wink
...in a sea of strangers where everybody is just a face, a person can stand out with a smile
May gina-admire ako galing nahuya ko magstorya sa iya nga face-to-face!!
arn0ld
Regular
Regular
 
Posts: 110
Joined: Fri Mar 31, 2006 7:09 pm
Location: Las Phelippinas

Postby DjDarkman on Fri Aug 25, 2006 9:16 pm

IE is the only browser I ignore ,cause I won`t make trash htrml because of that buggy Mosaic based browser that is at least 12 years old and still not capabile of displaying a png image right ,I check my site in Opera ,FF ,links and Konqueror ,but maybe your problem is because of the fonts.
DjDarkman
Valued Member
Valued Member
 
Posts: 166
Joined: Wed May 24, 2006 9:14 pm

Postby demonio on Fri Sep 01, 2006 9:23 pm

I hate to adjust the sites for all browsers, sometimes I work all day long to do it.
The biggest problem is the IE. In Opera and Firefox my css scripts is perfect, but in the IE my codes doesn't work very well
demonio
Newbie
Newbie
 
Posts: 15
Joined: Fri Sep 01, 2006 9:03 pm

Postby dama on Sun Sep 03, 2006 1:01 am

http://www.w3schools.com/ is a good place with lots of help / tutorials / examples for html newbies (me among them Laughing )
dama
Regular
Regular
 
Posts: 104
Joined: Wed Jul 05, 2006 6:11 pm
Location: us


Return to General Webmastering

Who is online

Users browsing this forum: No registered users and 1 guest

cron