1

I have been developing websites for a couple of years now and I almost never check if my pages are valid HTML and CSS. My check is by using a site such as browsershots.org and checking how it looks in all the different browsers. However recently I have been taking a college course and the prof wants us to validate every thing we turn in. It got me to thinking.

should I care if my pages validate or not?

4

13 に答える 13

4

はい、ここですでに取り上げた理由によります。

必ずしも商用 Web サイトについて話しているわけではないことは承知していますが、とにかくそのように振る舞うのは良いことです。

于 2008-10-12T20:26:59.207 に答える
1

Just checking that your webpage looks good in different browsers might seem to work now, but in the future web browsers will change and your page might not look right anymore. If your pages are valid HTML and CSS, however, newer browsers should display them correctly in the future.

于 2008-10-12T20:21:11.293 に答える
1

you can (and should) validate your CSS/HTML

beyond getting better grades, some projects / industries will require validation for various purposes. if you're interested in a future career in any of these sectors may as well start now :)

于 2008-10-12T20:23:23.630 に答える
1

はい、標準は変化する世界での防御です。あなたのサイトがこの種の Web ブラウザーで動作するからといって、標準に準拠していない場合、次の Web ブラウザーでうまくいくという保証はありません。正直なところ、Web ブラウザーは、Web サイトの存続期間中に何度も更新されることがよくあります。

勤勉な開発者として、ブラウザーが更新されるたびに再テストを行うと確信していますが、更新とテスト (修正) の間にはウィンドウがあります。:-)

于 2008-10-12T20:26:14.060 に答える
0

間違いを犯していないことを確認するために検証します。バリデーターがブラウザーの互換性のために入力しなければならないことについて不平を言った場合、おそらくそれを無視することができます。

于 2008-10-12T20:38:30.307 に答える
0

絶対!あなたのサイトは有効でなければなりません!有効なHTML/CSSは、10年後の将来のブラウザで機能する可能性がはるかに高くなります。

于 2008-10-12T20:48:59.053 に答える
0

Yes. Your teacher may reduce your grade otherwise.

于 2008-10-12T20:17:10.850 に答える
0

I find that validation is a matter of principle more than what is required. It's very hypocritical to slate IE for its lack of standards compatibility when we still nowadays only test for the popular browsers.

ALWAYS check to see if your page is valid, always.

于 2008-10-12T20:21:50.670 に答える
0

Well, this is almost holy war territory. If you are having trouble with CSS, making sure your HTML and CSS validate is a really good diagnostic step. It can sometimes cause accessibility problems if your HTML is very badly munged. Otherwise, there aren't really any practical reasons to worry about it.

Taking care in your work and pride in your craftsmanship, though, that's something else. If your pages validate, it's like a little gold star and you get a warm fuzzy feeling for a few seconds. It's a best-practice.

If you like doing things the absolutely right way, then sure, care about it.

于 2008-10-12T20:22:24.583 に答える
0

Webpage validation is, in my mind, a complex matter. On the one hand, you have the W3C recommendation - that is just that: a recommendation - that might or might not (probably not) render equally in all browsers. On the other hand, you have your CSS/HTML tweaks and hacks that make each page render pixel-perfectly, but most probably doesn't validate with he W3C validator.

In real life, it's a world of compromises. I, personally, try to do both - have as few validation errors, but having the main emphasis on it actually looking good with widely used browsers.

But, in an academic life, I think it's entirely fair for the professor to require 100% W3C compliance. It is, however, the closest that we have of a spec for HTML/XHTML, and that's what the academic people are ultimately interested in - the theory.

于 2008-10-12T20:25:44.607 に答える
0

ページを検証することは良いことだと思いますが、これにはいくつかの誤解があります。

まず、おそらく XHTML を実行したくないと思うでしょう。なぜなら、ブラウザに間違った方法でさまざまな方法で提供しているからです。HTML 4.0 Strict に固執します。

第二に、有効なページを持つことは素晴らしく便利ですが、それで自分を責めたり、他の人のページを検証したりしないでください。これを本当に楽しんでいる人もいますが、それは意地悪でしかありません。

最後に、行が極端に長くならないように、ページ内のテキストを「埋める」ようにしてください。検証とは関係ありませんが、人間が HTML を読むのに役立ちます。

于 2008-10-17T18:22:46.100 に答える
0

エリックが言ったように、多くの大規模な Web サイトは検証されませんが、たとえば Firefox、Safari/Chrome、Opera などで完全に動作する検証 Web サイトから始めれば、それは正しく、またはほぼ正しく動作する可能性があります。残りの 3 つはわずかな調整だけで正しくなります。

その後、IE などの Trident ベースのブラウザーに必要なハックに取り組むことができます。一般的な Web サイトの大部分では、IE7 と IE6 で動作させるために必要なハックは有効です。

その時点で、問題をデバッグし、検証されない調整/ハックを開始するのは簡単です。

サーバー側のプログラミングを使用できる場合は PHP を使用するか、またはクライアント側で JavaScript を使用すると、どのブラウザーが使用されているか (正しいユーザー エージェントを送信していると仮定) を簡単に判断できます。各ブラウザのスタイルシート。IE6 および 7 には、特定のスタイルシートをロードするための特別な作業を必要としない HTML ハックがありますが、Gecko、Webkit、または Presto ブラウザー (Firefox、Safari/Chrome、または Opera) で利用できるものは何もないため、別の方法は次のとおりです。これらのブラウザに固有のものに必要です。

于 2008-10-13T12:04:14.010 に答える
0

私は常に自分の Web ページを検証します。同じことを行うことをお勧めしますが、多くの大企業の Web サイトは検証を行わず、検証できません。すべてのシステムで Web サイトがまったく同じように見えることの重要性には、ルールを破る必要があるためです。

一般に、有効な Web サイトは、奇妙な構成 (携帯電話など) でもページの見栄えを良くするのに役立ちます。

于 2008-10-12T20:26:29.397 に答える