• ベストアンサー

W3C標準

W3Cの標準になっているかどうかMarkupValidation Serviceで調べたところ不可解な指摘があります。以下がそれなんですが Line 34, Column 8: end tag for "td" omitted, but OMITTAG NO was specified. </div> You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">". </div> の後ろの > に赤字になっています。</div />にしろということでしょうか? 実際のタグは</div>になっています。他にも似たいような指摘があり、閉じ方を指摘されています。ちゃんと閉じているのに、と思うのですが、どうなんでしょうか?

  • HTML
  • 回答数7
  • ありがとう数7

質問者が選んだベストアンサー

  • ベストアンサー
回答No.5

34行8文字目のtdの終了タグが見つからないといっています。 エラーメッセージを見る限りXHTMLでしょうか。 HTMLではOMITTAGはYESですが,XMLではOMITTAGはNOになります。 http://www.w3.org/TR/html4/sgml/sgmldecl.html#h-20.1 http://www.w3.org/TR/NOTE-sgml-xml-971215#null3 # HTMLとXMLで対比しているのは,XMLをSGMLアプリケーション扱いした場合のみOMITTAGが出てくるから。 XHTMLでは,HTMLで許されていた曖昧でない終了タグの省略ができなくなっているので,<td>に対して</td>を明示する必要があります。

kurobon619
質問者

お礼

Yune-Kichiさん おっしゃるとおりです。抜けてました。 ありがとうございます。

その他の回答 (6)

  • leap_day
  • ベストアンサー率60% (338/561)
回答No.7

こんにちは DTDにXHTML宣言してます? あと <table> <tr> <td>aaa </tr> </table> のような書き方していませんか? HTML4.01であればこの書き方でもO.K.がでますがXHTMLであれば開始タグだけで終了タグが無いとそのタグは空要素と認識されて『 <** /> 』のように書いてくださいと忠告されます <td>aaa</td> のようにちゃんと閉じてみてください そのエラーの下に青いアイコンで Line **, Column **: start tag was here. ってのがありません? その<td>が閉じられていませんと言う意味ではないですか?

kurobon619
質問者

お礼

leap_dayさんありがとうございます。 発見しました。おっしゃるとおりです。いつの間にか 消してしまってました。

回答No.6

</div>のエラーはtdの省略(omitted)の補足事項として書かれている物でしょうか? そうではなく、単体のエラー(他のエラーを全て修正しても表示されるエラー)であれば、 <div>(開始タグ)を書かずに、</div>(終了タグ)だけを書いていると言うことはないですか?

kurobon619
質問者

お礼

talooさんありがとうございます。</div>のエラーはtdの省略(omitted)の補足事項として書かれている物のようです。 </td>が抜けてました。

  • goldfox
  • ベストアンサー率49% (123/249)
回答No.4

>head の中にテーブルタグを入れてます。この辺はちゃんとブラウザに正しく反映されているので間違えないとおもいます。 head要素の中にtable要素を入れていたら、完璧間違いですけど。 No.1でお勧めした文法チェックでは、その部分について何と出ましたか?

kurobon619
質問者

お礼

goldfoxさん、ありがとうございます。解決いたしました。

kurobon619
質問者

補足

goldfoxさん遅くまでありがとうございます。 申し訳ありません、書き方が不注意でした。head の中ではなく 任意でつけた headerの中の間違えです。head は関係なく、bodyの中のレイアウトの頭の部分を指しています。申し訳ありません。

  • shimix
  • ベストアンサー率54% (865/1590)
回答No.3

>この</div>は <div id="header">に対応するものです。その間にtable >タグが入ってます。<td>はその中にあり書き損じていることはないんですが。 位置関係は間違いないですね。<div id="header">から</div>の間に<table>から</table>まで全部入っているということでいいですね?

kurobon619
質問者

お礼

shimixさん解決しました。ありがとうございました。

kurobon619
質問者

補足

shimixさん、そうです。head の中にテーブルタグを入れてます。この辺はちゃんとブラウザに正しく反映されているので間違えないとおもいます。

  • shimix
  • ベストアンサー率54% (865/1590)
回答No.2

>end tag for "td" omitted tdとdivの位置関係はどうなっていますか?

kurobon619
質問者

補足

shimixさんご回答いただきありがとうございます。 この</div>は <div id="header">に対応するものです。その間にtable タグが入ってます。<td>はその中にあり書き損じていることはないんですが。

  • goldfox
  • ベストアンサー率49% (123/249)
回答No.1

http://openlab.ring.gr.jp/k16/htmllint/htmllintl.html こちらでやってみるとどうですか?

kurobon619
質問者

お礼

goldfoxさんありがとうございます。参考にさせていただきます。

関連するQ&A

  • XHTML1.1で空要素タグを書くと、W3CのValidatorでエラ

    XHTML1.1で空要素タグを書くと、W3CのValidatorでエラーが出てしまいます。 下記のXHTMLをW3CのValidatorでチェックをすると、body内の<br />の箇所でエラー出てしまいます。 =========================================================== <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=shift_jis" /> <title></title> </head> <body> <br /> </body> </html> =========================================================== エラーの内容は下記の通りです。 document type does not allow element "br" here; missing one of "ins", "del", "h1", "h2", "h3", "h4", "h5", "h6", "p", "div", "pre", "address", "fieldset" start-tag <br /> The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element. One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>"). =========================================================== <img>などの<br />以外の空要素タグを入れても同様のエラーが出ます。 ただし、<div><br /></div>とするとエラーが出ません。 XHTML1.1の仕様では、空要素タグはブロック要素タグなどで囲わないといけないのでしょうか? もしくは、記述になにか間違いがあるのでしょうか? ご教示をお願いいたします。

    • ベストアンサー
    • HTML
  • Movable Type 3.0のメインページの再構築ができません。

    ムーバブルタイプのメインインデックスの再構築ができません。 エラー内容 Build error in template 'Main Index': Error in <MTEntryPermalink> tag: You used an 'MTEntryLink' tag outside of the context of an entry; perhaps you mistakenly placed it outside of an 'MTEntries' container? デフォルトにソースを戻しても同様のエラーが出ます。

  • 英文翻訳お願いいたします。

    個人輸入でアメリカで商品を購入後、キャンセルしたところ以下のメールがきました。 大変でも英文翻訳お願いいたします。 I can cancel these for you . Can I issue you an ecertificate to use on you next purchases instead of a credit card refound.

  • 英訳をお願いします

    I want to buy the knife Able: 1968 the tree kings deluxe. And I need guidance how I pay to you Together with shipping to Israel Because the shipment is not specified and there is an option Hubs

  • 何がダメなのかわからない

    http://validator.w3.org/check?uri=referer で自分のサイトを見てみたら、 62 Errors, 3 warning(s) となり、たくさんのエラーに驚きました。 ただなぜエラーになるのかわからない部分があります。 例えば、 <body text="gray" link="#808080"> がエラーとなっていますが、何がいけないのでしょうか? --------------------------------------------------------- Line 10, Column 12: there is no attribute "TEXT" <body text="gray" link="#808080"> ✉ You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead). This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information. How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash. --------------------------------------------------------- と書いてあります。

    • ベストアンサー
    • HTML
  • 英訳のヒントを!!

    学校で英語の書いたメモを拾いました。内容は I like it when you're close to me. Cause you're making the most of me And shorty you inspire me. To be all the man can be oh we'll carry on some how I do believe some things are meant to be です。ピリオドが途中ないので、どこで切れるかわからないし 「shorty」は「shortly」の間違いじゃないかなぁ、とか思いつつ 訳してみたのですが、後半がさっぱりわかりません。 口語っぽいので何かの歌詞でしょうか。 前半は、 あなたが私のそばにいるときが好きだ。 だって、私を大事にしてくれるから。 そしてやがて私を元気づける。 でだいたい合っているのでしょうか。 授業中に見つけたただの紙切れですが、素敵なことを書いていそうな雰囲気があったので。。。

  • 日本語に訳して下さい!

    日本語に訳して下さい! おねがいします!! ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー Yes an additional 40%. At this time it is running too close to sale to pull any product for you. IT needs to be done within 2 weeks of sale for my staffing. If you can tell me a time that you plan on being in our store on the 30th, I can plan to have an employee work individually with you to find the best deals in the store. We will do our best to accommodate, looking forward to building our relationship.

  • MovableType4.2の管理画面が開きません(悲)

    Mysqlをインストールしてから、mt.cgi をブラウザから実行すると下記のエラーがでて、movabletypeの管理画面に入れません。 原因がわからず困っております。何卒、知恵をお貸しください。 Got an error: Can't locate object method "install_properties" via package "MT::Tag" (perhaps you forgot to load "MT::Tag"?)

  • 2009年7月23日のJapan Timesの記事に下記英文がありまし

    2009年7月23日のJapan Timesの記事に下記英文がありました。 I did not graduate from the literature department of a famous university because my father pused me into pharmacy school instead. Yet I became a translator because I just could not stop reading and writing. What you're meant to be, you will be. この最後の英文の意味を専門家の方に説明をお願いします。

  • 解説をお願いします

    一応自分でも解いてみましたが、自信がないので解説をお願いします。 四択問題です。 1. They finally succeeded in catching the tiger ( ). 1. livingly 2. live 3. livable 4. alive 私の答えは4. aliveです。 誤りを指摘する問題です。 1. Are you possible to come to the office an hour earlier than usual tomorrow? 私の答え Are you possible → Is it possible for you 回答お待ちしております。

専門家に質問してみよう