此代码不会在 DreamWeaver 的设计视图上显示内容。为什么?

This code will not display content on design view on DreamWeaver. Why?

提问人:Connor Mayer 提问时间:2/23/2023 更新时间:2/23/2023 访问量:102

问:

这是我用可视化代码编写的第一个代码。当我切换到 DreamWeaver Design View 时,页面是空白的。

你能告诉我代码缺少什么吗?

法典:

<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<style type="text/css">
body,td,th {
    font-family: Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 18px;
    color: #020202;
 }
 bo
dy {
     background-color: #D9DDD7;
 }
</style>
<title>Connor Mayer's Student Portfolio</title>
<meta name="keywords" content="Connor Mayer Student Portfolio, student, wake tech, programmer, web developer, cyber security">
<meta name="description" content="My name is Connor Mayer, this page is for displaying contact information.">
<!-- ConnorMayer, CTI110-0006 -->
</head>
<h1>" Get In Touch"</h1>
    <p> "Feel free to contact me anytime via email or phone with the contact information below."</p>
    <ul>
              <li>Phone:<br>
              (919) - 867 - 5309</li>
            </ul>
<body><p>&nbsp;</p>
</body><ul>
              <li>Email:<br>
                <p style="font-family: Gotham, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-weight: bold; font-size: 18px;"><a href="mailto:[email protected]"> [email protected]</a></p></li>
            </ul>
            <!-- This file is my own work and I typed everything manually, Mayer-->          
</html>




I have compared it to my landing page code which does show in the design view and cannot find any errors.
HTML 语法 错误 Dreamweaver

评论

0赞 devlin carnate 2/23/2023
好吧,对于初学者来说,尝试通过 HTML 验证器运行您的代码。

答:

0赞 Robert Bradley 2/23/2023 #1

首先,尝试将你的代码更改为这个(我删除了一些凌乱、松散和不必要的代码)。

<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<style type="text/css">
body,td,th {
    font-family: Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 18px;
    color: #020202;
 }
dy {
     background-color: #D9DDD7;
 }
</style>
<title>Connor Mayer's Student Portfolio</title>
<meta name="keywords" content="Connor Mayer Student Portfolio, student, wake tech, programmer, web developer, cyber security">
<meta name="description" content="My name is Connor Mayer, this page is for displaying contact information.">
<!-- ConnorMayer, CTI110-0006 -->
</head>
<body>
<h1>Get In Touch</h1>
    <p>Feel free to contact me anytime via email or phone with the contact information below.</p>
<br>
    <ul>
        <li>Phone:<br>
        (919) - 867 - 5309</li>
    </ul>
<br>
    <ul>
        <li>Email:<br>
        <p style="font-family: Gotham, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-weight: bold; font-size: 18px;"><a href="mailto:[email protected]">[email protected]</a></p></li>
    </ul>
</body>
            <!-- This file is my own work and I typed everything manually, Mayer-->          
</html>

0赞 Jason Bruce 2/23/2023 #2

你缺少了正确的位置的开始和结束标签,你有额外的开始和结束正文标签,并且你的 css 中的第二个正文标签被分成两行。

<!-- css -->
body,td,th {
font-family: Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 18px;
color: #020202;
}
body {
 background-color: #D9DDD7;
}

<!-- html -->
<body>
<h1>" Get In Touch"</h1>
<p> "Feel free to contact me anytime via email or phone with the contact information below."</p>
<ul>
 <li>Phone:<br>
 (919) - 867 - 5309</li>
</ul>
<ul>
 <li>Email:<br>
 <p style="font-family: Gotham, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-weight: bold; font-size: 18px;"><a href="mailto:[email protected]"> [email protected]</a></p></li>
</ul>
<!-- This file is my own work and I typed everything manually, Mayer--> 
</body>