我的代码对w3标准有效吗? [英] Is my code valid for w3 standard ?

查看:74
本文介绍了我的代码对w3标准有效吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是原始代码。



Here is original code.

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Company page</title>
  </head>
  <body>
	<header>
    <paragraph>Welcome! Here you can find following things:</paragraph>
    <ol>
      <li><a href="#logo">Company's logo</a></li>
      <li><a href="#employees">List of employees</a></li>
    </ol>

	<section>
    <h1>Company's logo
    <paragraph>Company uses following logos:</paragraph>
    <ul>
      <li>New logo:</li><img source="new_logo.gif"/>
      <li>Old logo:</li><img source="old_logo.gif"/>
      <input type="number" name="name" value="" >
    </ul>
	<br>
    <h1>List of employees
    <thead>
      <th>First name</th>
      <th>Last name</th>
    </thead>
    <table>
      <tr>
        <td>Mary</td>
        <td>Williams</td>
      </tr>
      <tr>
        <td>James</td>
        <td>Smith</td>
		<tbody>
			<td>me</td>
		<tbody>
      </tr>
    </table>
	<a href="google" target="new window"><div>click me</div></a>
  </body>
</html>





我尝试过:





What I have tried:

引用:

这是这样的展示



A表格行宽1列,小于colu mn计数由第一行(2)确定。

从第40行第16栏;到第41行,第9栏

It's show like this

A table row was 1 columns wide, which is less than the column count established by the first row (2).
From line 40, column 16; to line 41, column 9







<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8" />

  <title>Company page</title>
</head>

<body>
  <a>Welcome! Here you can find following things:</a>
 
  <ol>
    <li><em><a href="#logo">Company's logo</a></em></li>

    <li><em><a href="#employees">List of employees</a></em></li>
  </ol>

  <h1>Company's logo </h1>
  <a>Company uses following logos:</a>

  <ul>
    <li>New logo:<img src="new_logo.gif" alt="404 Not found" /></li>

    <li>Old logo:<img src="old_logo.gif" alt="404 Not found" /></li> 
  </ul>
    <input type="number" name="name" value=""/><br/>

  <h1>List of employees</h1>

  <table>
    <thead>
      <tr>
        <th>First name</th>

        <th>Last name</th>
      </tr>
    </thead>
    <tbody>
   
    <tr>
      <td>Mary</td>

      <td>Williams</td>
    </tr>

    <tr>
      <td>James</td>

      <td>Smith</td>
    </tr>

    <tr><td>me</td><td></td></tr>

      </tbody>
    
  </table>
<a href="google" target="new window"><div>click me</div></a>
</body>
</html>

推荐答案

这将建议您: W3C标记验证服务 [ ^ ]


你好代码没有通过任何验证错误,但它有你指定的行的警告,因为你选择在标题中使用两列,而不是在这样的行中跟随,以便于详细说明。



你已经开始了h以下



YOur code didnot through any validation errors but it has warning of the line you specified because you have choose to use two columns in the header and not followed in some rows like this for easy elaboration.

YOu have started with following

<table>
   <thead>
     <tr>
       <th>First name</th>

       <th>Last name</th>
     </tr>
   </thead>





表有两列标题,在第一行跟着标题你有开始行只有单列这样。





table with two columns of header and in the first row followed header you have start row with only single column like this.

<tr>
      <td></td>
    </tr>





您需要更换它





you need to replace this with

<tr>
      <td></td>
       <td></td>
    </tr>





在最后一行中,您通过创建单列行来重复同样的错误



and in the last row you repeat the same mistake by creating row with single column


引用:

表行为1列宽,小于第一列建立的列数第(2)行。

从第40行第16栏;到第41行,第9列

A table row was 1 columns wide, which is less than the column count established by the first row (2).
From line 40, column 16; to line 41, column 9



该消息表示它所说的内容。


The message means what it says.

<table>
  <thead>
    <tr> // Here, you have 2 columns
      <th>First name</th>

      <th>Last name</th>
    </tr>
  </thead>

  <tr> // Here, you have 1 column: that is the problem.
    <td></td>
  </tr>

  <tr> // Here, you have 2 columns
    <td>Mary</td>

    <td>Williams</td>
  </tr>


这篇关于我的代码对w3标准有效吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆