Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/sql-server-2005/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
HTML-如何保持在表格中心左对齐?_Html_Css - Fatal编程技术网

HTML-如何保持在表格中心左对齐?

HTML-如何保持在表格中心左对齐?,html,css,Html,Css,这是我第一次真正体验HTML。我的目标是重现这样的结果: 要做到这一点,我需要在一个表中创建。我正处于代码开发的开始阶段,但到目前为止我已经做到了: <body> <table id="container" style="width: 98%;"> <table id="header" border="1" align="center" cellpadding="0" cellspacing="0" style="width: 100%;"> &l

这是我第一次真正体验HTML。我的目标是重现这样的结果:

要做到这一点,我需要在一个表中创建。我正处于代码开发的开始阶段,但到目前为止我已经做到了:

<body>
<table id="container" style="width: 98%;">
  <table id="header" border="1" align="center" cellpadding="0" cellspacing="0" style="width: 100%;">
    <td valign="top" align="center">
      TODO
    </td>
  </table>
  <table id="content" border="1" align="center" cellpadding="0" cellspacing="0" style="width: 100%;">
    <td valign="top" style="text-align: center">
      <h2 align="center" style="line-height: 40%; font-family: 'Roboto';">Beginner's Guide to Web Development</h2>
      <p align="center" style="line-height: 35%; font-family: 'Roboto';">Curious about web development but not sure where to start?</p>
      <p align="center" style="line-height: 35%; font-family: 'Roboto';">Or maybe you just need to brush up on some of the basics.</p>
      <p align="center" style="line-height: 35%; font-family: 'Roboto';">Our new Beginner's Guide to Web Development has you</p>
      <p align="center" style="line-height: 35%; font-family: 'Roboto';">covered! Read through it now to explore (or rediscover) the</p>
      <p align="center" style="line-height: 35%; font-family: 'Roboto';">foundations of web dev.</p>
    </td>
  </table>
  <table id="footer" border="1" align="center" cellpadding="0" cellspacing="0" style="width: 100%;">
    <td valign="top" align="center">
      TODO
    </td>
  </table>
</table>
结果是:

那么,如何在不降低中心的情况下将文本与红线对齐

OBS:我知道使用样式标签是一种不好的做法,但目的是开发一种可以在任何电子邮件应用程序中读取的代码。

待办事项 Web开发初学者指南

对web开发很好奇,但不确定从哪里开始

或者你只需要温习一些基本知识

我们新的Web开发初学者指南已经为您提供了帮助

盖满!现在通读它,探索或重新发现

网络开发的基础

待办事项