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

时间:2015-08-06 20:13:59

标签: html css

这段代码有什么问题?它适用于代码学院。我是html的新手,因此我仍在测试水域。我刚刚下载了括号,开始在代码学院之外做自己的事情,但这严重阻碍了我。这有什么不妥? 每次我尝试预览时,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;
    }

2 个答案:

答案 0 :(得分:1)

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

>>> local_tz = pytz.timezone('America/Chicago')
>>> local_time = local_tz.localize(datetime.datetime(2015, 8, 6, 0, 0))
>>> print local_time
2015-08-06 00:00:00-05:00
>>> utc_time = local_time.astimezone(pytz.utc)
>>> print utc_time
2015-08-06 05:00:00+00:00

同时更改

<!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");` 

答案 1 :(得分:0)

对于每个人,可以通过以下步骤解决此问题:-

  1. 在菜单栏上,依次转到“文件->打开文件夹”(包含用于实时预览的html文件的文件夹)

  2. 选择文件夹

  3. 从左侧栏中选择您的html文件进行实时预览

  4. 单击右侧的螺栓图标(预览按钮)

所有这些都融合为一个事实,您需要选择该文件夹(其中有您的文件)以在实时预览中查看输出。 让我知道,是否可以帮助某人。 :)

enter image description here enter image description here enter image description here enter image description here