Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

HTML Code

Posted on 2006-07-18
7
Medium Priority
?
231 Views
Last Modified: 2006-11-18
Could someone check what is wrong with my syntax.

Here it is
<HTML>
<HEAD>
<TITLE>Column Span</TITLE>
 
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="MSHTML 6.00.2800.1400" name=GENERATOR></HEAD>
 
 
<TABLE cellSpacing=0 cellPadding=0 width=75% border=1>
 
  <TBODY>
 
  <TR>
    <TD vAlign=top align=left width=100>    This is my first table cell in the top row. </TD>
 
    <TD vAlign=top align=left width=100>This is my second table cell in the
      top row. </TD>
    <TD vAlign=top align=left width=100>This is my third table cell in the top
      row. </TD>
    Align=top align=left width=100>This is my fourth table cell in the
      top row. </TD>
<td>  Added row</TD>
  </tr>
 

<TR>
 
    <TD vAlign=top align=left width=100>This is my first table cell in the
      bottom row. </TD>
    <TD vAlign=top align=left width=300 colSpan=3>This is my second table cell
      in the bottom row. </TD>
</TR>
 
 
 
</TBODY>
</TABLE>
 
</BODY>

0
Comment
Question by:Higante
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 5

Expert Comment

by:koolie
ID: 17135693
your missing the  <td  on the first row, as well as you have to aligns in that cell.  you needed valign.  Here is the corrected code. For future reference, use all caps or all lowercase inside of your tags(just better practice, but you never know when IE is gonna mess with you)  Also, quote your attribues (ex.  valign="top")  A good wysiwyg editor will help you.  Dreamweaver if you can afford it or try something like coffee cup editor http://www.coffeecup.com/

<HTML>
<HEAD>
<TITLE>Column Span</TITLE>
 
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="MSHTML 6.00.2800.1400" name=GENERATOR></HEAD>
 
 
<TABLE cellSpacing=0 cellPadding=0 width=75% border=1>
 
  <TBODY>
 
  <TR>
    <TD vAlign=top align=left width=100>    This is my first table cell in the top row. </TD>
 
    <TD vAlign=top align=left width=100>This is my second table cell in the
      top row. </TD>
    <TD vAlign=top align=left width=100>This is my third table cell in the top
      row. </TD>
        
    <td valign=top align=left width=100>This is my fourth table cell in the
      top row. </TD>
  </tr>
 

<TR>
<td>  Added row</TD>

 
    <TD vAlign=top align=left width=100>This is my first table cell in the
      bottom row. </TD>
    <TD vAlign=top align=left width=300 colSpan=2>This is my second table cell
      in the bottom row. </TD>
</TR>
 
 
 
</TBODY>
</TABLE>
 
</BODY>
</HTML>
0
 
LVL 5

Assisted Solution

by:koolie
koolie earned 1000 total points
ID: 17135698
woops...you need a body tag as well

<HTML>
<HEAD>
<TITLE>Column Span</TITLE>
 
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="MSHTML 6.00.2800.1400" name=GENERATOR></HEAD>
 
 <body>
<TABLE cellSpacing=0 cellPadding=0 width=75% border=1>
 
  <TBODY>
 
  <TR>
    <TD vAlign=top align=left width=100>    This is my first table cell in the top row. </TD>
 
    <TD vAlign=top align=left width=100>This is my second table cell in the
      top row. </TD>
    <TD vAlign=top align=left width=100>This is my third table cell in the top
      row. </TD>
       
    <td valign=top align=left width=100>This is my fourth table cell in the
      top row. </TD>
  </tr>
 

<TR>
<td>  Added row</TD>

 
    <TD vAlign=top align=left width=100>This is my first table cell in the
      bottom row. </TD>
    <TD vAlign=top align=left width=300 colSpan=2>This is my second table cell
      in the bottom row. </TD>
</TR>
 
 
 
</TBODY>
</TABLE>
 
</BODY>
</HTML>
0
 
LVL 1

Expert Comment

by:dharmeshmaniar
ID: 17137152
u have missed start of <body> tag after </head>
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:Higante
ID: 17140172
koolie,

I am not sure what you mean about the missing <td> in the first row.  I could not locate this part.
0
 
LVL 17

Accepted Solution

by:
Suat Ozgur earned 1000 total points
ID: 17142374
Hi,

Please read the modified code below.

<html>
<head>
<title>Column Span</title>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252" />
<meta content="MSHTML 6.00.2800.1400" name=GENERATOR />
</head>
<body>
<table cellSpacing="0" cellPadding="0" width="400px" border="1">
  <tbody>
  <tr>
    <td vAlign="top" align="left" width="100px">This is my first table cell in the top row. </td>
    <td vAlign="top" align="left" width="100px">This is my second table cell in the top row. </td>
    <td vAlign="top" align="left" width="100px">This is my third table cell in the top row. </td>
    <td vAlign="top" align="left" width="100px">This is my fourth table cell in the top row. </td>
  </tr>
  <tr>
    <td vAlign="top" align="left" width="100px">This is my first table cell in the bottom row. </td>
    <td vAlign="top" align="left" width="300px" colSpan=3">This is my second table cell in the bottom row.</td>
  </tr>
  </tbody>
</table>
</body>
</html>

If you need to make table width = 75% then also use % for the cell widths like below:

<table cellSpacing="0" cellPadding="0" width="75%" border="1">
  <tbody>
  <tr>
    <td vAlign="top" align="left" width="25%">This is my first table cell in the top row. </td>
    <td vAlign="top" align="left" width="25%">This is my second table cell in the top row. </td>
    <td vAlign="top" align="left" width="25%">This is my third table cell in the top row. </td>
    <td vAlign="top" align="left" width="25%">This is my fourth table cell in the top row. </td>
  </tr>
  <tr>
    <td vAlign="top" align="left" width="25%">This is my first table cell in the bottom row. </td>
    <td vAlign="top" align="left" width="75%" colSpan=3">This is my second table cell in the bottom row.</td>
  </tr>
  </tbody>
</table>

Since I saw that you wanted the same width, I used 25% for the cells. However you should change them according to column number (20% for 5 columns).
Also, you don't have to set width property for the second row since the first row will do the job (in this sample).

I hope it helps.

Suat
0
 
LVL 17

Expert Comment

by:Suat Ozgur
ID: 17142386
typo:
colSpan=3" should be colSpan="3" in the modified codes in my post above.

Suat
0
 
LVL 1

Expert Comment

by:maonas
ID: 17147119
try this:

<HTML>
<HEAD>
<TITLE>Column Span</TITLE>
 
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="MSHTML 6.00.2800.1400" name=GENERATOR></HEAD>
 
<body>
<TABLE cellSpacing=0 cellPadding=0 width=75% border=1>
<TBODY>
 
 <TR>
    <TD vAlign=top align=left width=100>This is my first table cell in the top row. </TD>
    <TD vAlign=top align=left width=100>This is my second table cell in the top row. </TD>
    <TD vAlign=top align=left width=100>This is my third table cell in the top row. </TD>
    <td vAlign=top align=left width=100>This is my fourth table cell in the top row. </TD>
 </tr>
 <tr>
      <td colspan=4> Added row</TD>
 </tr>
 <TR>
    <TD vAlign=top align=left width=100>This is my first table cell in the bottom row. </TD>
    <TD vAlign=top align=left width=300 colSpan=3>This is my second table cell in the bottom row. </TD>
 </TR>
</TBODY>
</TABLE>
 
</BODY>
</html>
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question