Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/83.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,当我向css文件中添加要测试的内容时,网页上什么也没有发生 随机文本,这样我就可以发布这个,而不需要更多的细节 <html> <head> <title>Basket Gifts</title> <link rel="stylesheet" type="text/css" href="css/style.css"> </head> <body> <div id="container"> <div

当我向css文件中添加要测试的内容时,网页上什么也没有发生

随机文本,这样我就可以发布这个,而不需要更多的细节

<html>
<head>
<title>Basket Gifts</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<div id="container">
<div id="header">
<img src="http://www.displaybanner.com/images/sample_banner.jpg"   alt="Banner">

        </div> <!--ends the header-->

        <div id="main">
            <p>Mum & Baby girl gifts<br>
            <p>Mum & Baby boy gifts<br>
            <p>Nail & Beauty products<br>
            <p>Food Hamper<br>
            <p>Chocolate Hamper<br>
            <p>Fruit Basket<br>
            <P>Cheese & Biscuits Hamper<br>

            <br><br>
            <h3>Select your price range</h3>
            <form>
                <input type="radio" name="hi" value="value">$30-40</input><br>
                <input type="radio" name="hi" value="value">$40-50</input><br>
                <input type="radio" name="hi" value="value">$50-60</input><br>
                <input type="radio" name="hi" value="value">$60-70</input><br>
                    <br><br>
                <input type="text" name="Name" placeholder="Name"><br>
                <input type="text" name="Phone" placeholder="Address"><br>
                <input type="text" name="Address" placeholder="Phone Number"><br>
                <input type="text" name="email" placeholder="Email Address"><br>
                <input type="text" name="confirm email" placeholder="Confirm Email">
            </form>
        </div> <!--Ends the main content area-->

        <div id="footer">
        <p>Your Receipt and order confirmation will be sent to your email soon, A confirmation of delivery will be sent three days before the date required.<br> Please not all baskets will be posted. <br>No collections are appplicable.<br>
        </div> <!--ends the footer-->
    </div> <!--ends the container-->
</body>

任何帮助都将不胜感激。

您的html代码中有几个错误,我为您添加了修复的html和css:

<!DOCTYPE html>
<html>
    <head>
        <title>Basket Gifts</title>
        <link rel="stylesheet" type="text/css" href="css/style.css">
    </head>
    <body>
        <div id="header" >
            <h1>Basket Gifts</h1>
            <p>Would you like baskets made and delivered anywhere in New Zealand? Click on the link below to choose what types of basket you want,<br> choose the price range and the the delivery address, and the date required. once all the contact details and the direct credit payment is confirmed,<br> an email will be sent to you confirming delivery, and the number of the track and trace parcel Please allow for two weeks before the requested date.</p>
        </div> <!--ends the header-->

        <div id="main" >

            <p>Mum & Baby girl gifts</p>
            <p>Mum & Baby boy gifts</p>
            <p>Nail & Beauty products</p>
            <p>Food Hamper</p>
            <p>Chocolate Hamper</p>
            <p>Fruit Basket</p>
            <P>Cheese & Biscuits Hamper</p>

        <br><br>
        <h3>Select your price range</h3>
        <form>
            <input type="radio" name="hi" value="value" />$30-40<br>
            <input type="radio" name="hi" value="value" />$40-50<br>
            <input type="radio" name="hi" value="value" />$40-50<br>
            <input type="radio" name="hi" value="value" />$60-70<br>
                <br><br>
            <input type="text" name="Name" placeholder="Name" /><br>
            <input type="text" name="Phone" placeholder="Address" /><br>
            <input type="text" name="Address" placeholder="Phone Number" /><br>
            <input type="text" name="email" placeholder="Email Address" /><br>
            <input type="text" name="confirm email" placeholder="Confirm Email" />
        </form>

        </div> <!--Ends the main content area-->

        <div id="footer" >
            <p>Your Receipt and order confirmation will be sent to your email soon, A confirmation of delivery will be sent three days before the date required.<br> Please not all baskets will be posted. <br>No collections are appplicable.</p>
        </div> <!--ends the footer-->
    </body>
</html>

我确实运行了你的代码,它运行得很好

即使没有正确的代码,它也可以正常工作。。我的意思是你的风格应用在
html
文件中

以下是运行代码的时间(不更正代码)

尽管你错过了很多贴牌

这是正确的代码

<html>
<head>
<title>Basket Gifts</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<div id="container">
<div id="header">
<img src="http://www.displaybanner.com/images/sample_banner.jpg"   alt="Banner">

        </div> <!--ends the header-->

        <div id="main">
            <p>Mum & Baby girl gifts</p><br>
            <p>Mum & Baby boy gifts</p><br>
            <p>Nail & Beauty products</p><br>
            <p>Food Hamper</p><br>
            <p>Chocolate Hamper</p><br>
            <p>Fruit Basket</p><br>
            <P>Cheese & Biscuits Hamper</p><br>

            <br><br>
            <h3>Select your price range</h3>
            <form>
                <input type="radio" name="hi" value="value">$30-40</input><br>
                <input type="radio" name="hi" value="value">$40-50</input><br>
                <input type="radio" name="hi" value="value">$50-60</input><br>
                <input type="radio" name="hi" value="value">$60-70</input><br>
                    <br><br>
                <input type="text" name="Name" placeholder="Name"><br>
                <input type="text" name="Phone" placeholder="Address"><br>
                <input type="text" name="Address" placeholder="Phone Number"><br>
                <input type="text" name="email" placeholder="Email Address"><br>
                <input type="text" name="confirm email" placeholder="Confirm Email">
            </form>
        </div> <!--Ends the main content area-->

        <div id="footer">
        <p>
        Your Receipt and order confirmation will be sent to your email soon, A confirmation of delivery will be sent three days before the date required.<br> Please not all baskets will be posted. <br>No collections are appplicable.<br>
        </p>
        </div> <!--ends the footer-->
    </div> <!--ends the container-->
</body>
</html>

篮子礼物
妈妈和女婴礼物


妈妈和宝宝礼物


美甲和美容产品


食物篮


巧克力篮


果篮


奶酪和饼干篮




选择您的价格范围 30-40美元
40-50美元
50-60美元
60-70美元






您的收据和订单确认书将很快发送到您的电子邮件中,发货确认书将在所需日期前三天发送。
请不要将所有篮子都寄出
没有可应用的集合。


您的style.css文件在css子目录中吗?您的style.css文件在css文件夹中吗。首先检查它。您也不应该使用结束输入标记。相反,如果您希望文本与输入元素相关联,请使用标签。是的,它位于css文件夹中。当您不投票时,请考虑周到地对您的否决决定发表评论itSorry@Grahammackinosh我的评论不适合您。:)好的@GrahamMackintosh。谢谢你找到解决办法了吗?是的,我的问题得到了回答。。。为什么有人进入我的帖子,对所有事情都投否决票?
#container {
    background-color: red;
}

#header {
    background-color: red;
}

p {
    font-family: calibri;
}

#main, #footer, #container, #header {
    text-align: center
}
<html>
<head>
<title>Basket Gifts</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<div id="container">
<div id="header">
<img src="http://www.displaybanner.com/images/sample_banner.jpg"   alt="Banner">

        </div> <!--ends the header-->

        <div id="main">
            <p>Mum & Baby girl gifts</p><br>
            <p>Mum & Baby boy gifts</p><br>
            <p>Nail & Beauty products</p><br>
            <p>Food Hamper</p><br>
            <p>Chocolate Hamper</p><br>
            <p>Fruit Basket</p><br>
            <P>Cheese & Biscuits Hamper</p><br>

            <br><br>
            <h3>Select your price range</h3>
            <form>
                <input type="radio" name="hi" value="value">$30-40</input><br>
                <input type="radio" name="hi" value="value">$40-50</input><br>
                <input type="radio" name="hi" value="value">$50-60</input><br>
                <input type="radio" name="hi" value="value">$60-70</input><br>
                    <br><br>
                <input type="text" name="Name" placeholder="Name"><br>
                <input type="text" name="Phone" placeholder="Address"><br>
                <input type="text" name="Address" placeholder="Phone Number"><br>
                <input type="text" name="email" placeholder="Email Address"><br>
                <input type="text" name="confirm email" placeholder="Confirm Email">
            </form>
        </div> <!--Ends the main content area-->

        <div id="footer">
        <p>
        Your Receipt and order confirmation will be sent to your email soon, A confirmation of delivery will be sent three days before the date required.<br> Please not all baskets will be posted. <br>No collections are appplicable.<br>
        </p>
        </div> <!--ends the footer-->
    </div> <!--ends the container-->
</body>
</html>