gpt4 book ai didi

html - 关于括号和html,错误说我没有索引文件但是有

转载 作者:太空宇宙 更新时间:2023-11-04 11:34:02 25 4
gpt4 key购买 nike

这段代码有什么问题?它适用于代码学院。我真的是 html 的新手,因此我仍在用它试水。我刚刚下载了 brackets 开始在代码学院之外做我自己的事情,但这严重阻碍了我。这似乎有什么问题?每次我尝试实时预览时,Brackets 都会抛出错误。它说:“确保文件夹中有一个 html 文件或我有一个 index.html 文件。

<!DOCTYPE html>
<html>
<head>
<link type="text/css" rel="stylesheet" href="main.css"/>
<title>Free Play!</title>
<h1>
<strong>
<em>And then there was her...</em>
</strong>
</h1>
</head>
<body>>
<div align = center>
<img src= "http://cdn.sheknows.com/articles/2011/09/couple-arguing-in-kitchen.jpg"/>
</div>
<div align = "center">
<table>
<thead>
<th colspan = "2;">Dialog betwen two idiots<th>
<thead>
<tr>
<td style="font-size: 18px"><strong>Me:</strong></td>
<td><strong>Her:<strong></td>
</tr>
<tr>
<td><em>Hey!</em></td>
<td><em>-yeah?</em></td>
</tr>
<tr>
<td><em>do you care?</em></td>
<td><em>-don't think so!</em></td>
</tr>
</table>
</div>
<p><em><strong>
"Life is too short to be wasting time being stupid, enjoy what you have and live!"

</strong></em></p>

</body>
</html>

这是代码的 css 部分。

body{
background-image = url("http://www.rabne.tk/wp-content/uploads/2015/03/1dcb945e76e166670e8ab59fd7378901.jpg");
background-size: cover;
background-color: #cccccc;
}
h1{
text-align: center;
color: solid black;
background-color: orange;
}
th{
background-color: red;
font-size: 30px;
border-bottom: 10px solid black;
}
td{
text-align: left;
background-color: orange;
border-bottom: 2px solid black;
border-right: 2px solid black;
border-left: 2px solid black;
border-top: 2px solid black;

}

img{
border-bottom: 5px solid black;
border-right: 5px solid black;
border-left: 2px solid black;
border-top: 2px solid black;
}
table{
text-align: right;
}

p{
text-align: center;
}

最佳答案

你到处都是语法错误,试试这个:

<!DOCTYPE html>
<html>
<head>
<link type="text/css" rel="stylesheet" href="main.css"/>
<title>Free Play!</title>

</head>
<body>
<h1>
<strong>
<em>And then there was her...</em>
</strong>
</h1>
<div align = "center">
<img src= "http://cdn.sheknows.com/articles/2011/09/couple-arguing-in-kitchen.jpg"/>
</div>
<div align = "center">
<table>
<thead>
<th colspan = "2">Dialog betwen two idiots<th>
<thead>
<tr>
<td style="font-size: 18px"><strong>Me:</strong></td>
<td><strong>Her:</strong></td>
</tr>
<tr>
<td><em>Hey!</em></td>
<td><em>-yeah?</em></td>
</tr>
<tr>
<td><em>do you care?</em></td>
<td><em>-don't think so!</em></td>
</tr>
</table>
</div>
<p><em><strong>
"Life is too short to be wasting time being stupid, enjoy what you have and live!"

</strong></em></p>

</body>
</html>

也改

background-image = `url("http://www.rabne.tk/wp-content/uploads/2015/03/1dcb945e76e166670e8ab59fd7378901.jpg");` 

`background-image: url("http://www.rabne.tk/wp-content/uploads/2015/03/1dcb945e76e166670e8ab59fd7378901.jpg");`

关于html - 关于括号和html,错误说我没有索引文件但是有,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31864952/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com