Forum Moderators: open
Need your help again.
I'm getting this error message
Line 222, column 14:
<p><a class="bodyone" href="convo-heavywall.html"><u>PTFE ... ^
Error: element "P" not allowed here; possible cause is an inline element containing a block-level element
I am getting this error on a bulleted list
and it is among the many thousands of error messages I get when I try to validate this page. My pages never validate and most of the time when I look at what the error messages are saying, I don't see what is actually wrong.
Could someone please look at this page and tell me how I am suppose to write the code for this list correctly. The site is <in my profile - the "convoluted" page>
Also, I do my pages in Front Page and they never validate but I still have good positions on search engines and they look fine when I look at them on the web. Am I missing something? Is it normal that sites done in FP don't validate or am I doing something wrong? Is it really important that they do validate?
Thanks
Janine
(edited by: tedster at 10:49 pm (utc) on Mar. 27, 2002)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
to
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
That's all I use and the pages validate and look the same in both browsers.
<font> is an inline element.
<p> is a block=level element.
It is not valid HTML to have p tags contained within font tags.
Invalid:
<font>
<p>text text
<p>text text
</font>
Valid:
<p><font>text text</font>
<p><font>text text</font>
It's probably the most prevalent kind of invalid code on web pages today. Using the font tag and writing valid code requires MANY pairs of <font></font>. Browsers forgive it, and apparently so do many spiders...or do they?
To have the page look the same with IE change
That's MSIE's "Doctype switch" at work. MSIE uses different CSS rendering modes depending on the DOCTYPE (mostly so that MSIE 6 will continue to render HTML 2.0/3.0/3.2 pages the same way MSIE 5 did). It's one of those features that actually made me swear at the screen when I read about it.
[msdn.microsoft.com...]
I keep reading statements like these even on webmasterworld and it makes me sick. So I thought about writing a rant, why it's plain wrong to consider Microsoft's Internet Explorer (MSIE) the standard and ignoring all other browser. But first, I'd like to say thanks to Brett_Tabke for his excellent "wake up call".
According to StatMarket [statmarket.com], two thirds of all browsers are MSIE. So 33 % of all surfers are using different browsers, e.g., NN, Mozilla, or Opera. Some sites allow for MSIE and NN but block Opera, cause they think they can afford it. But can they? Could any brick-and-stone shop tell 1/3 or even 5 to 10 % of its customers off? I don't think so!
Let's have a look at this article: Internet Explorer 6 mit 30 Prozent Marktanteil [heise.de]. The publisher (Heise online) is a very popular German web site (according to IVW it's the most visited journalistic (news) web site in the German speaking Internet) published to following user agent stats for March 2002:
Browserhersteller Anteil
Microsoft 66,9 %
Netscape 21,3 %
Opera 7,8 %
Now let's imagine Heise publishes a story about your company and links to it. Unfortunately your site is MSIE or MSIE/NN only. What happens? You are telling a lot of potential customers off. Does sales/management know this is happening? Probably not. And that's a shame, too.
Some "web designers" might argue, 95 % of their users use MSIE so it's okay to design an MSIE only site. Wrong. They should ask themselves, why all NN and Opera users avoid their site!
Of course, your customers will mainly be MSIE users after some time if you are telling all other users off! And it's not just these users you are missing: you are missing all users they might have referred to your site, too. And possibly even your brick-and-stone (or catalogue) company might suffer, cause these users will associate your site to your brand and feel you don't deserve their money. I could give you an example of a popular German shopping site that tells you to download a "real" browser if you click banner ads leading to their site.
On the other hand there are companies that obvious had smarter programmer and web designer that allow all browsers in and that might even offer text or Lynx versions of their site. And they are very popular and successful!
Moreover, if you're blocking certain browsers, it's quite possibly that you are accidently denying search engines to access your site. Can you afford that?
So I strongly agree with Brett that one should validate all pages or at least all new pages and that they should work with any browser. You should even try to get it Bobby AAA approved. Is it hard? Yes. But as soon as you know the pitfalls that prevent accessibility, it becomes easier to write code that validates.
The Germany Grundgesetz (Basic Law) states that all people are to be treated equal. What if a disabled person can't access your job offers or fill out the online application form? They might even be able to sue you cause they couldn't get the job they wanted due to your poor design. Do we really need laws to enforce accessibility? What if U.S. Section 508 Guidelines or something similar becomes mandatory to all online shops and company sites? Will you be up to it?
I code for standards, pure and simple. Why? Because they make so much sense.
I can live without MSIE propriety filters and such.
You know the what the best part is? Coding for Web Standards and Accessibilty is just soooo easy!
just one point left: disabled persons.
though my site has as many users per month as other sites have per day
and thus it's unlikely one of them is a disabled person, well, you never know.
so in the future i'm gonna try to do it w3c valid. :)
hm, when i declare the outline javascript as text/javascript it doesn't
work anymore because it's encoded js...
inline and block level elements.. looking at the traffic of my site the
bandwidth won't be influenced too much if i corrected that...
the additional attributes in the frame tag...
will it still work for disabled people when there are additional tags?
won't they be ignored?
..and the noframe tag..
not definied for html 4.01? i thought it was a useful thing for people
using browsers that do not support frames?
what do these people do now if they visit my site?
However, I have a statement regarding the motivation behind the entire "validation movement." As a user of Netscape 4.7 (why? because I like the way you can manage bookmarks in it compared to any other browser), I would be interested to know why I find that most of the designers in the "validation movement" feel that this browser is just junk.
To me, every web page should be designed to be seen in the most possible browsers. This doesn't seem like rocket science from a marketing point of view -- if people can't view your web page correctly, they probably won't buy from you.
To use an example from here at WW, let me direct this to papabaer who I know is one of the largest proponents of validating (which is as I said above something that I am aspiring to). When I look at the page which you list in your profile -- [bigbaer.com...] -- in my browser (NN 4.7) the page is totally out of control. Then, when I pull up the same page in Mozilla or IE (I did this because I had an idea that your page probably wasn't designed the way I was seeing in NN), the page and the entire site looks like a brilliant piece of both web design work and SEO (great design and SEO are a difficult pair to reconcile, but your site does a great job; except in NN).
So, my question is this: What are the primary reasons to validate a page to W3C standards when this means that viewers with non-conforming browsers will miss the best possible presentation of your company? Really, I'm very interested in understanding this.
P.S. I hope you understand, papabaer, that I am not trying to single you or your site out in any way :)
Jason
First, I agree that there are things to love in Netscape 4. I still use it from time to time - I like the bookmarks too, and the mail client.
But that browser version has some really tough problems. Instead of really building a css engine, they adapted their old javascript style sheets (jss) work. It was a kludge and it's nasty. Turn off javascript to avoid pop-ups and all the page's styles vanish too! The tables and frames rendering has all kinds of little glitches - NOT features, errors! At release, all of this wasn't such a big deal, but now with standards coming more and more into play it IS a big deal.
Yes, cross-browser support makes sense, to whatever degree your business model requires it. And it's always a judgement call how far you will go.
Sometimes serving one market segment very well means trading off another segment. If by cutting off 10% of your visitors you can significantly increase your conversions on the remaining 90%, that can make solid business sense.
The fact is that standards are essential for the web. How fast designers and users adapt is an important question, but eventually standards will rule. And we all come along at whatever pace makes sense for our particular purposes.
Up until 3-4 months ago, I had the entire site laid out with a combination of tables and divs. NN4.x would have seen it all except for the occasional iframe.
Then, even the iframes included content placed between the tags that could be viewed by those using NN.4x.
I am a very strong supporter of Web Standards and Accessibility. I made a conscious choice in this area that "puts my money where my mouth is" both literally and figuratively.
To be fair, the site is a learning tool for me, covering many apects. Believe it or not, at one time it was almost entirely Flash built: now it is most certainly not.
What I did was to attempt two primary things: first build a validating XHTML site that uses css for the entire layout (learning and tweaking) along the way, and second to NOT hide the fact that NN4 is severly hampered regarding CSS as well as some basic HTML issues (iframes for one).
I've taken the radical approach... yep that's me! Hard-headed (or soft, depending on your pov) and outspoken, espcially when confronted with issues that just make sense, such as Web Standards.
Shortly, the remainder of my javascript will be gone, but that is an entirely different issue.
The fact is I would be willing to bet that a sizeable majority of those using NN4.x do not even have a clue that their browser is lacking functionality. I talk to many young students who actually believe that NN4.x is the greatest browser ever made and that it is the complete answer to demonstrate their defiance against a certain very large software company.
Little do they realise that NN4 has been a key player in the propriety wars and not quite so innocent itself.
When I suggest to the students that their browser is lacking in key display areas, the common reply is, "It works fine for me. I never have any trouble with it...." Ahhh, you see the problem?
I, along with a few others commited to progress, decided to show them that there is indeed something lacking in their browser. it is a decision that is NOT for the squeamish, nor for the practical. At least a first review.
You got to see two extremes; it certainly made you look twice! I used to incude a hidden div ala the WebStandards.org Browser Upgrade Initiative, but no longer.
You know how at a party, you might find all the guests avoiding a certain someone who is suffering from an acute case of bad breath? Most people would just use avoidance, me? I would take Bob aside and tell him the truth upfront. "Tough Love" is never easy.
Now, let me expound on my other, a bit more self-serving purpose ( I did mention two, didn't I?): building pages that get found.
Since converting to XHTML, eliminating all tables (for layout) and tweaking my CSS as well as working with search engines in mind, there has been a drastic change in my site traffic.
There has been a steady increase in traffic, right now I am seeing close to a 150% increase overall, just from last November (late), yes I have added a number of pages since then, but nowhere near enough to account for the traffic increase. Net gain? or net loss? Steadily increasing traffic, 150% increase (really!) in a matter of months? Compare that to NN4 global stats (currently a little over 4%).
The increase in traffic? That, I attribute to code reduction and opimization. Most of my new pages have at least a 50/50 text to code ratio; I have several that reach 70/30 and soon even that will be topped.
Could I accomplish close to the same and still appease NN4? To a degree, but not without compromises I am not willing to make.
One other point regarding "ignoring users" - Current stats show that approximately 12% of surfers surf with javascript disabled. Think about that!
What does strike me as ironic is that some will tout NN4 compatibility while loading up their sites with javascript and dhtml... Kind gives you pause, dosn't it?
All those javascript/dhtml menus that will never function for those surfers. As I mentioned, I am eliminating the remainder of my javescript. I do not need it.
Remember, I AM a hard-head! ;) And I am learning (and refining) CSS techniques that I would have to abandon if I elected NN4 compatibilty.
I also deal with a large number of students, and forgoing NN4 compatibilty while whole-heartedly adopting Web Standands gives me a perfect platform to evangelize... ;)
Shortly, I will be optimizing for braille and aural browsers.
I see this as more important than NN4 compatiblity.
One path leads to the future, the other the past.
Everyone has to do what they must, and believe me, I know most cannot (yet) take this path. However, for those building personal sites where the choice may be a bit easier, I would ask you to consider building for standards and learning the techniques now, not later.
For me, the next step is migrating to a 100% liquid layout, a streamlined (themed!) navigation sytem, and structuring content to optimize the display with css turn-off.
Obviously, both of you seek to have profitable and successful web-related businesses; that's why you're here at WW -- in fact, that's why most of us are here. We are here to learn from each other what it takes to really "make it" online in practical terms. How that relates in practical terms to the issue of designing w3c validating sites is of utmost importance to the futures and incomes of many of us here.
Having said all of that, here are my opininions in response to your postings.
1. If desining validating pages generates more traffic (especially 150% more), then it is essential for me and every serious designer to learn how to design validating pages.
2. Where and how to learn? Taking a look at the course offerings at the local colleges in my area (Detroit Metro Area), I havent't found any courses that can teach coding in this fashion. So, where should I and others look online to to learn? How did you learn? Would you reccomend any books?
3. Assuming that I and some majority of other designers start designing up to standards, wouldn't it still be a good idea to serve a "viewable" page to browsers that don't meet standards, instead of serving up these glib statements like, "You could view this page if you had a browser that met web standards!" or often times something even worse?
4. For me, the W3C validator is not very helpful or clear in pointing out what is wrong with my code (granted, my current knowledge of "proper coding" doesn't help much). Is there a forum here at WW that has discussed the pros and cons to using different validators? Is there a brand (free if available) that you two would reccomend for validating locally?
5. Now that my world has been turned upside down, where can I sign up for the Netscape 4.7 Anonymous meetings? I'm going to need them ;)
Well, thanks again for clarifying your viewpoint on why you are such "crusaders for validation." I'm not sure how long it will be until the rest of the design world catches on to this idea, but if it can really bring in that much more traffic, then I hope that my competitor designers take a VERY long time! ;)
Jason
By writing validating code, you are making a commitment to abide by a set of established rules. The good part is, you and everyone else who writes html already knows most of these rules... we just get a little sloppy around the edges sometimes (sometimes more than a little!).
One of the big advantages of writing Web Standards compliant code is that you will write LESS code, since you can bid adieu to those nasty font tags and other such nonsense. Less is More!
For my two-cents one of the best paths to validation is by coding in XHTML, since the rules here are precise are quite clear:
That pretty much sums up the basics: four simple little rules.
There are other things can will help as well, first, use a Web Standards compliant browser. Personally, I love Opera because it will not balk when it comes to pointing out bad code. MSIE's great flaw (some would say greatest strength!) is that it is a very forgiving browser. It allows sloppy code, where other browsers would not.
WYSIWYG editors are not the way to learn good coding habits either; even the best can add propriety code that will prevent validation.
My own preference has me working with Homesite 5 (Tidy set to XHTML doctype is a very nice feature!) and the Opera browser. Please note however that I said "preference," this combination suits my work style, it may or may not suit yours.
Use the resources here at WebmasterWorld, there are already many references to a great many resources for Web Standards, Accessibility and CSS. A site search will give you lots to work with.
Adopt a doctype and start building small test pages that you can run through a validator and learn form. If you write a huge page first, and then go to validate, it may seem overwhelming if there are a lot of returned errors while a smaller page will work beautifully as a specific lesson.
Most of all, learn by doing. There is no substitute. You will learn from experience and the experience will stick.
And last, if you run into a problem or situation that seems to have no solution, bring it to the forum. WebmasterWorld is a great place to learn... and to brainstorm. Ask, share, contribute, those three are the best means of learning lasting knowledge.