Click here to Skip to main content
15,867,330 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Here is original code.

HTML
<!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:

Quote:
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


HTML
<!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>
Posted
Updated 3-Aug-18 0:22am
v4
Comments
Patrice T 17-Mar-17 2:46am    
"It's still have some bug inline 41, 58 "
And we have to guess what are the bugs and where are those lines ?
Member 13064822 17-Mar-17 2:48am    
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
Patrice T 17-Mar-17 3:28am    
Use Improve question to update your question.
So that everyone can pay attention to this information.

This will advise you: The W3C Markup Validation Service[^]
 
Share this answer
 
Comments
Member 13064822 17-Mar-17 2:54am    
I'm using it, but not sure after I have change some code,
it is correct for W3 standard or not?
Graeme_Grant 17-Mar-17 2:55am    
If it is not, then that website will tell you.
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
 
Share this answer
 
Quote:
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.
HTML
<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>
 
Share this answer
 
v2
<!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><a href="#logo">Company's logo</a></li>

    <li><a href="#employees">List of employees</a></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  colspan="2">me</td></tr>

      </tbody>
    
  </table>
<a href="google" target="new window"><div>click me</div></a>
</body>
</html>
 
Share this answer
 
v2
Comments
Dave Kreskowiak 3-Aug-18 7:56am    
Just posting an unexplained code snippet as an answer isn't an answer. This question was already answered with better explanations over a year ago.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900