Web Hosting, Design, & Coding forum

General discussion

Different browsers read code differently?

I just completed a working draft of my soon-to-be web site. It's been created with Web Page Maker V2.0. I'm still ''flight testing'' the seven-page site on my own computer.

I spent most of today making page and paragraph links and checking them. They all work fine in Internet Explorer-6. However, when I checked the pages in Firefox 1.0, the pages looked fine, but links for one main page and all 11 page/paragraph links (on two pages) didn't work.

The paragraph links take you from one page to another page and also to specific paragraphs on those pages. The paragraph links in Firefox only take me to the assigned page, but not the specific paragraphs.

Could I please get your ideas about what might be causing this? If I compare the HTML codes in the two browsers source views, what should I be looking for?

I figured I'd ask here first in case there are known differences in how these two browsers (and others?) handle links and perhaps the links can't be made to work in all browsers. Thanks.

Discussion is locked
You are posting a reply to: Different browsers read code differently?
The posting of advertisements, profanity, or personal attacks is prohibited. Please refer to our CNET Forums policies for details. All submitted content is subject to our Terms of Use.
Track this discussion and email me when there are updates

If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.

You are reporting the following post: Different browsers read code differently?
This post has been flagged and will be reviewed by our staff. Thank you for helping us maintain CNET's great community.
Sorry, there was a problem flagging this post. Please try again now or at a later time.
If you believe this post is offensive or violates the CNET Forums' Usage policies, you can report it below (this will not automatically remove the post). Once reported, our moderators will be notified and the post will be reviewed.
Collapse -
Try this.

In reply to: Different browsers read code differently?

Run your code through the HTML VALIDATOR at www.w3c.org I find many sites have errors.

Bob

Collapse -
Comparing html in different browsers...

In reply to: Different browsers read code differently?

...won't do you any good - the code will look identical, it's how the browser interpret the code where the problem comes from.

My guess would be you have an error in there somewhere, and as IE likes to assume what you mean, it may guess correctly, whereas Firefox will show you what you really coded.

Make sure you have the spot you want to jump to bookmarked with an <a name=''bookmark''></a> and then link to it via <a href=''whateverpage.html#bookmark">Jump to Bookmark</a>

Collapse -
Yes they do

In reply to: Different browsers read code differently?

Different browsers all interpret the code differently. This is why you will notice that some sites look garbage in Mozilla but look good in IE. This has to do with the configuration made when developing the browser. For example, one of the most well known Firefox problems when compared to IE is the way it interprets the screen. There are however ways to get around such problems, and most just require a little searching.

However, this is the first time that I have come across your problem. My first suggestion is to make sure that your linking everything properly with quotations and everything. This is because, like Andrea B. said, IE does an awesome job of interpreting what you were trying to do rather than exactly what you are telling it to do. While this is great for in-experienced web developers, try moving their code to a different browser, and you'll see where there problems are.

Mozilla on the other hand does exactly what you tell it to do, so if you link just a little incorrectly, it wont work.

Collapse -
News Update

In reply to: Different browsers read code differently?

I just ran my site's first (index) page through the code validator at w3.org/check as Bob suggested. It reports 60 - sixty! - errors on the page.

Thanks for the pointers, all, and I'll report back if (when?) I find the cause of the link failures.

Collapse -
More New News

In reply to: News Update

I repaired all of those inoperative links in Firefox except for one major page link. I did the repair work by copying the links that were working from one good page and pasting them into the bad pages. So I haven't really worked with the HTML code - yet.

However, my FAQs (Freq. Asked Quests.) link doesn't work on any of the Firefox pages. Clicking the FAQ link at the top of each of the seven pages won't take me anywhere. These same links work fine in IE.

As mentioned, I ran the online W3 Validator and came up with 60 errors. I also ran the "Tidy" function of HTML Kit program and it showed 54 warnings. The problem for me is that these errors/warnings are too cryptic for me to really understand or act on. One typical warning from the W3 Validator is:

Error Line 194 column 182: required attribute "ALT" not specified.
...6295.jpg" border=0 width=21 height=14></div>
The attribute given above is required for an element that you've used, but you have omitted it. For instance, in most HTML and XHTML document types the "type" attribute is required on the "script" element and the "alt" attribute is required for the "img" element.

Typical values for type are type="text/css" for <style> and type="text/javascript" for <script>.

-------------------------------------------------

I understand the function of basic HTML code and how to place them in documents but I don't have a large mental library of memorized code. I think it would take me a lot of time to get myself up to speed (plus CSS and Javascript) to be able to make easy sense of the error messages in Validator and HTML Kit.

Also, I'm guessing that using Web Page Maker, which is a WYSIWYG developer, might add a lot of broken and leftover codes in the final document. This would come from the easy-to-use drag & drop method of building the pages. Every time you move an element, parts of codes might be left in the element's old position?

I'm sitting here trying to figure out my next move. Even if I get that broken FAQ link to work in Firefox, I'm sure maintaining my web site later will be sweat work with those 60 code errors in it.

Collapse -
Links to different parts of the same web page

In reply to: More New News

Hi Fred,

Linking to different parts of the same web page, (and to specified sections on a different web page), is a difficult concept to grasp straight away, and it is easy to make an error in the coding. Browsers usually either ignore html errors and skip to the next instruction or display what is obviously not meant, because although the coding is wrong for what you wanted, it may still be valid.

If Firefox is skipping incorrect coding it makes it harder to track the error down.

Then, with WYSIWYG html builders, you have even more problems because you don't actually see the coding as it is being installed.

Paragraph linking is called bookmarking by some, (not to be confused with Firefox's bookmarking web sites). The method to use is to ''name'' the place you want a link to go to, then use that ''name'' in the <a href=''''></a> anchor tag, or in other words in the link that will take you there.


Like this;

Some way down the web page you have a paragraph of text, (for instance). It starts;

<br><!------ forces a line break in the displayed text-->
This is where your paragraph starts and your first line is here<br>
Your second line is here<br>
Your third line is here<br><br>


Now, to ''name'' the paragraph, place the following <a name> tag before the first line, You actually use the word ''name'' in the tag, ie;

<a name=''paragraph1''></a><!-- don't forget the quotation marks-->

So now the paragraph has a name, called paragraph1.

At the top of your web page, (or wherever else you want to link to this paragraph), add this <a href> anchor tag; eg

<a href=''#paragraph1''>Go here for more info</a>

In that example, the ''Go here for more info'' becomes the link, and it should take you directly to ''paragraph1''. The ''#'' is needed before the name of the paragraph you want to link to. So, the coding will look like this;

<br>
<a name=''paragraph1''></a>This is where your paragraph starts and your first line is here<br>
Your second line is here<br>
Your third line is here<br><br>


The link, at the top of the page to this area looks like;

<a href=''#paragraph1''>Go here for more info</a>


If the place you want to link to is on a different web page, all you need do is place the name of the web page before the ''#'' in the linking code, ie, if the other web page is saved under the name ''web-page-number-2.html, then the anchor tag is;

<a href=''web-page-number-2.html#paragraph1''>Go here for more info</a>

That gets more difficult. If the other web page is in a different directory, or on a different web site, you need the full path, eg;

<a href=''Next-Page/web-page-number-2.html#paragraph1''>Go here for more info</a><!--- where the other web page is in a folder called Next-Page'' but under the same root directory-->, or

<a href=''http://www.myhomepage/web-page-number-2.html#paragraph1''>Go here for more info</a> <!-- where the paragraph is on another web site altogether-->

Whether this naming tag is still accepted by the W3C HTML convention as valid I am not sure, but if it is, then Firefox should also accept the coding and execute it as you wish. In the W3C site below on Advanced html it is still stated to be acceptable, but that article was written in 2000, and things tend to move fast as far as valid code is concerned.

http://www.w3.org/MarkUp/Guide/Advanced.html

I hope this helps. It is a very difficult subject to get to grips with, and no doubt you will need to experiment with it to get it to work satisfactorily.

Good luck

Mark

Popular Forums

icon
Computer Newbies 10,686 discussions
icon
Computer Help 54,365 discussions
icon
Laptops 21,181 discussions
icon
Networking & Wireless 16,313 discussions
icon
Phones 17,137 discussions
icon
Security 31,287 discussions
icon
TVs & Home Theaters 22,101 discussions
icon
Windows 7 8,164 discussions
icon
Windows 10 2,657 discussions

SMART HOME

This one tip will help you sleep better tonight

A few seconds are all you need to get a better night's rest.