HTML Table – Align Text and line

I am trying to align the text in my table. I would like it to look like this screenshot:

I would like to have the first line with “Arcui quam id partinuculam” to match my screenshot where it goes right above the line starting with “Arcu”.

Currently I have:

<!DOCTYPE html>
<html dir="ltr" lang="en-US">
<head><meta charset="UTF-8">


</head>
<body><!--Make the whole page a table so the <thead> acts as the header-->
       
             
        
<table>
  <tbody>

  <tr>
      <td colspan="5"><span>Arcui quam id partinuculam </span></td>
     <td style="border-bottom:1px black solid;width:400px;height:40px"> </td>
  </tr>

  <tr>
      <td style="height:40px;vertical-align: bottom;text-align:left;">Arcu</td>
      <td style="border-bottom:1px black solid;width:400px;height:40px"> </td>
      <td colspan="4" style="height:40px;vertical-align: bottom;text-align:left;" >, partium ut proponit conditione ad molunt donec</td>
   
  </tr>
  <tr>
      <td style="height:40px;vertical-align: bottom;text-align:left;">Nihil</td>
      <td style="border-bottom:1px black solid;width:400px;height:40px"> </td>
      <td style="height:40px;vertical-align: bottom;text-align:left;">Elucescunt</td>
      <td style="border-bottom:1px black solid;width:400px;height:40px"> </td>
  </tr>
  <tr>
      <td style="height:40px;vertical-align: bottom;text-align:left;">Opiniones </td>
      <td style="border-bottom:1px black solid;width:400px;height:40px"> </td>
  </tr>
  <tr>
      <td style="height:40px;vertical-align: bottom;text-align:left;">Erat </td>
      <td style="border-bottom:1px black solid;width:400px;height:40px"> </td>
  </tr>

</tbody>
</table>

  

</body>
</html>

It was suggested to me that to make it look the way I want would depend on the width of the table and the width of the columns/cells. It looks like the table is too narrow to fit the full sentence and line.

Would anyone know what I need to change in HTML to make this work?

5

What you have isn’t a table. So don’t use a <table>.

What you have is five lines of text, with some stylistically underlined spaces. For example:

<p style="line-height:2rem;">
  Arcui quam id partinuculam <span style="display:inline-block;border-bottom:1px solid #000;width:14rem;"></span><br/>
  Arcu <span style="display:inline-block;border-bottom:1px solid #000;width:12rem;"></span>, partinum ut proponit conditione ad molunt donec<br/>
  Nihil <span style="display:inline-block;border-bottom:1px solid #000;width:11rem;"></span> Elucescunt <span style="display:inline-block;border-bottom:1px solid #000;width:17rem;"></span><br/>
  Opiniones <span style="display:inline-block;border-bottom:1px solid #000;width:11rem;"></span><br/>
  Erat <span style="display:inline-block;border-bottom:1px solid #000;width:8rem;"></span><br/>
</p>

(Note to readers: I’m continuing to use inline styles as the OP did mainly due to this comment in which it’s indicated that the result will be in an email, not on a website.)

Adjust widths as needed for the blank lines, adjust the line height as needed. I’m using rem units, you can use any units you prefer. Overall the point is that what you have is simply five lines of text. There’s no need to over-engineer this.

1

While I have not achieved the exact desired formatting, I am sharing an updated version still in table format (rather than in-line block).

td{width:25%}
<!DOCTYPE html>
<html dir="ltr" lang="en-US">
<head><meta charset="UTF-8">

</head>
<body><!--Make the whole page a table so the <thead> acts as the header-->


<table width="940" height = "50" table-layout = "auto">

    
  <tr>
    <td colspan="1" style="width: 340px; vertical-align: bottom;text-align:left">Arcui quam id partinuculam</td>
     <td colspan="1" style= "width: 550px; border-bottom:1px black solid;height:40px; bottom;text-align:left"> </td>
       
  </tr>

  <tr>
      <td style="width:340px; height:40px;vertical-align: bottom;text-align:left;">Arcu</td>
      <td style="border-bottom:1px black solid;height:40px"> </td>
      <td colspan="4" style="width:550px; height:40px;vertical-align: bottom;text-align:left">, partium ut proponit conditione ad molunt donec</td>

  </tr>
  <tr>
      <td style="width:100px; height:40px; vertical-align: bottom;text-align:left">Nihil</td>
      <td style="width:300px; height:40px; border-bottom:1px black solid"> </td>
      <td style="width:100px; height:40px;vertical-align: bottom;text-align:left">Elucescunt</td>
      <td style="width:440px; height:40px; border-bottom:1px black solid"> </td>
  </tr>
  <tr>
      <td style="height:40px;vertical-align: bottom;text-align:left;">Opiniones</td>
      <td style="border-bottom:1px black solid;width:400px;height:40px"> </td>
  </tr>
  <tr>
      <td style="height:40px;vertical-align: bottom;text-align:left;">Erat</td>
      <td style="border-bottom:1px black solid;width:400px;height:40px"> </td>
  </tr>

</table>



</body>
</html>

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa

HTML Table – Align Text and line

I am trying to align the text in my table. I would like it to look like this screenshot:

I would like to have the first line with “Arcui quam id partinuculam” to match my screenshot where it goes right above the line starting with “Arcu”.

Currently I have:

<!DOCTYPE html>
<html dir="ltr" lang="en-US">
<head><meta charset="UTF-8">


</head>
<body><!--Make the whole page a table so the <thead> acts as the header-->
       
             
        
<table>
  <tbody>

  <tr>
      <td colspan="5"><span>Arcui quam id partinuculam </span></td>
     <td style="border-bottom:1px black solid;width:400px;height:40px"> </td>
  </tr>

  <tr>
      <td style="height:40px;vertical-align: bottom;text-align:left;">Arcu</td>
      <td style="border-bottom:1px black solid;width:400px;height:40px"> </td>
      <td colspan="4" style="height:40px;vertical-align: bottom;text-align:left;" >, partium ut proponit conditione ad molunt donec</td>
   
  </tr>
  <tr>
      <td style="height:40px;vertical-align: bottom;text-align:left;">Nihil</td>
      <td style="border-bottom:1px black solid;width:400px;height:40px"> </td>
      <td style="height:40px;vertical-align: bottom;text-align:left;">Elucescunt</td>
      <td style="border-bottom:1px black solid;width:400px;height:40px"> </td>
  </tr>
  <tr>
      <td style="height:40px;vertical-align: bottom;text-align:left;">Opiniones </td>
      <td style="border-bottom:1px black solid;width:400px;height:40px"> </td>
  </tr>
  <tr>
      <td style="height:40px;vertical-align: bottom;text-align:left;">Erat </td>
      <td style="border-bottom:1px black solid;width:400px;height:40px"> </td>
  </tr>

</tbody>
</table>

  

</body>
</html>

It was suggested to me that to make it look the way I want would depend on the width of the table and the width of the columns/cells. It looks like the table is too narrow to fit the full sentence and line.

Would anyone know what I need to change in HTML to make this work?

5

What you have isn’t a table. So don’t use a <table>.

What you have is five lines of text, with some stylistically underlined spaces. For example:

<p style="line-height:2rem;">
  Arcui quam id partinuculam <span style="display:inline-block;border-bottom:1px solid #000;width:14rem;"></span><br/>
  Arcu <span style="display:inline-block;border-bottom:1px solid #000;width:12rem;"></span>, partinum ut proponit conditione ad molunt donec<br/>
  Nihil <span style="display:inline-block;border-bottom:1px solid #000;width:11rem;"></span> Elucescunt <span style="display:inline-block;border-bottom:1px solid #000;width:17rem;"></span><br/>
  Opiniones <span style="display:inline-block;border-bottom:1px solid #000;width:11rem;"></span><br/>
  Erat <span style="display:inline-block;border-bottom:1px solid #000;width:8rem;"></span><br/>
</p>

(Note to readers: I’m continuing to use inline styles as the OP did mainly due to this comment in which it’s indicated that the result will be in an email, not on a website.)

Adjust widths as needed for the blank lines, adjust the line height as needed. I’m using rem units, you can use any units you prefer. Overall the point is that what you have is simply five lines of text. There’s no need to over-engineer this.

1

While I have not achieved the exact desired formatting, I am sharing an updated version still in table format (rather than in-line block).

td{width:25%}
<!DOCTYPE html>
<html dir="ltr" lang="en-US">
<head><meta charset="UTF-8">

</head>
<body><!--Make the whole page a table so the <thead> acts as the header-->


<table width="940" height = "50" table-layout = "auto">

    
  <tr>
    <td colspan="1" style="width: 340px; vertical-align: bottom;text-align:left">Arcui quam id partinuculam</td>
     <td colspan="1" style= "width: 550px; border-bottom:1px black solid;height:40px; bottom;text-align:left"> </td>
       
  </tr>

  <tr>
      <td style="width:340px; height:40px;vertical-align: bottom;text-align:left;">Arcu</td>
      <td style="border-bottom:1px black solid;height:40px"> </td>
      <td colspan="4" style="width:550px; height:40px;vertical-align: bottom;text-align:left">, partium ut proponit conditione ad molunt donec</td>

  </tr>
  <tr>
      <td style="width:100px; height:40px; vertical-align: bottom;text-align:left">Nihil</td>
      <td style="width:300px; height:40px; border-bottom:1px black solid"> </td>
      <td style="width:100px; height:40px;vertical-align: bottom;text-align:left">Elucescunt</td>
      <td style="width:440px; height:40px; border-bottom:1px black solid"> </td>
  </tr>
  <tr>
      <td style="height:40px;vertical-align: bottom;text-align:left;">Opiniones</td>
      <td style="border-bottom:1px black solid;width:400px;height:40px"> </td>
  </tr>
  <tr>
      <td style="height:40px;vertical-align: bottom;text-align:left;">Erat</td>
      <td style="border-bottom:1px black solid;width:400px;height:40px"> </td>
  </tr>

</table>



</body>
</html>

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật