2017-02-24 94 views
-1

我试图制作一个2x2表格,以便布局是“任务说明”和“图片UMES”,然后在“2017”和第二行无序列表,但似乎无法弄清楚,它都显示为一个列表。包含标题,表格标题,正文标记和表格数据标记的HTML表格

<!DOCTYPE html> 
 
<html> 
 

 
<head> 
 
    <style type="text/css"> 
 
    h1 { 
 
     background-color: gray; 
 
     color: black; 
 
     font-family: Verdana 
 
    } 
 
    
 
    h2 { 
 
     color: gray; 
 
     font-family: Verdana 
 
    } 
 
    
 
    h3 { 
 
     font-family: Verdana 
 
    } 
 
    
 
    table { 
 
     background-color: white 
 
    } 
 
    
 
    th { 
 
     background-color: black; 
 
     color: white; 
 
     font-size: smaller 
 
    } 
 
    
 
    td { 
 
     background-color: gray; 
 
     font-size: smaller 
 
    } 
 
    
 
    body { 
 
     font-family: Arial; 
 
     color: black; 
 
     background-color: white 
 
    } 
 
    
 
    address { 
 
     font-family: "Courier New", monospace; 
 
     font-size: larger 
 
    } 
 
    </style> 
 
</head> 
 

 
<body> 
 
    <h1>University of Maryland Eastern Shore </h1> 
 
    <table> 
 
    <tr width="100%"> 
 
     <h2> UMES Mission Statement </h2> 
 
     <th> Picture UMES </th> 
 
    </tr> 
 
    <tr> 
 

 
     <body> 2017 </body> 
 
     <td> 
 
     <ul> 
 
      <li> Picture of <a href="hawk_mascot.jpg"> our mascot </a> </li> 
 
      <li> Picture of <a href="UMES_Campus.jpg"> our campus </a> </li> 
 
     </ul> 
 
     </td> 
 
    </tr> 
 
    </table> 
 
</body> 
 

 
</html>

+0

发布您的代码在你的问题吧。请参见[mcve] – j08691

+0

刚刚意识到我没有添加那个对不起,这里张贴新内容 – EndlessClavicle

+1

您的HTML在多个地方无效。尝试先通过验证程序运行它。例如:https://validator.w3.org/#validate_by_input – j08691

回答

0

我希望它会达到您的要求

<!DOCTYPE html> 
<html> 
<head> 
    <title></title> 
</head> 
<body> 
<table border="1"> 
    <tr> 
     <th>Mission Statement</th> 
     <th>Picture UMES</th> 
    </tr> 
    <tr> 
     <td>2017</td> 
     <td> 
     <ul> 
      <li>item 1</li> 
      <li>item 2</li> 
      <li>item 3</li> 
     </ul> 
     </td> 

    </tr> 
</table> 

</body> 
</html> 
+0

虽然你是正确的,你应该解释OP出错的地方,以及你的代码如何解决它。 –

+0

我的回答说,如果你遵循这种格式 –

+0

你可以达到你的要求,但你应该解释为什么它与提问者发布的相比是有效的。 –

0

固定起来...合并单元格= “2” 你找什么呢?

<!DOCTYPE html> 
 
<html> 
 

 
<head> 
 
    <style type="text/css"> 
 
    h1 { 
 
     background-color: gray; 
 
     color: black; 
 
     font-family: Verdana 
 
    } 
 
    
 
    h2 { 
 
     color: gray; 
 
     font-family: Verdana 
 
    } 
 
    
 
    h3 { 
 
     font-family: Verdana 
 
    } 
 
    
 
    table { 
 
     background-color: white 
 
    } 
 
    
 
    th { 
 
     background-color: black; 
 
     color: white; 
 
     font-size: smaller 
 
    } 
 
    
 
    td { 
 
     background-color: gray; 
 
     font-size: smaller 
 
    } 
 
    
 
    body { 
 
     font-family: Arial; 
 
     color: black; 
 
     background-color: white 
 
    } 
 
    
 
    address { 
 
     font-family: "Courier New", monospace; 
 
     font-size: larger 
 
    } 
 
    </style> 
 
</head> 
 

 
<body> 
 
    <h1>University of Maryland Eastern Shore </h1> 
 
    <table width="100%"> 
 
    <tr> 
 
     <th><h2> UMES Mission Statement </h2></th> 
 
     <th> Picture UMES </th> 
 
    </tr> 
 
    <tr> 
 
     <td colspan="2"> 
 
     <body> 2017 </body> 
 
     </td> 
 
    </tr> 
 
    <tr> 
 
     <td colspan="2"> 
 
     <ul> 
 
      <li> Picture of <a href="hawk_mascot.jpg"> our mascot </a> </li> 
 
      <li> Picture of <a href="UMES_Campus.jpg"> our campus </a> </li> 
 
     </ul> 
 
     </td> 
 
    </tr> 
 
    </table> 
 
</body> 
 

 
</html>