出於某種原因,我得到一個錯誤,指出:「元素風格不允許作爲元素形式的孩子」
元
style
不允許在此背景下元素form
的孩子。 (從這個子樹抑制進一步的錯誤。)線:17
這裏是我的代碼:
<!DOCTYPE HTML>
<html lang="en-US"><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
</head>
<body>
<form method="post" spellcheck="true" action="http://www.ijdky.net">
<input name="text" class="name" placeholder="Please Enter Name">
<!-- This Part is Where the user will type their name for the comment section-->
<br> <!-- Break -->
<br> <!-- Break -->
<style type="text/css"> textarea.html-text-box {background-color:white;background-repeat:no-repeat;background-attachment:fixed;border-width:4;border-style:solid;border-color:black;font-family:Georgia;font-size:16pt;color:black;}
input.html-text-box {background-color:ffffff;font-family:Georgia;font-size:12pt;color:000000;}
</style> <!-- The Comment Box -->
<textarea name="comments" cols="40" rows="10" class="html-text-box"> </textarea>
<br> <!-- Break -->
<br> <!-- Break -->
<input type="submit" value="Submit Comment" class="html-text-box">
<br> <!-- Break -->
<br> <!-- Break -->
<input type="reset" value="Reset Comment" class="html-text-box">
</form>
</body>
</html
<!-- begin snippet: js hide: false -->
<!-- language: lang-html -->
<!DOCTYPE HTML>
<html lang="en-US"><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
</head>
<body>
<form method="post" spellcheck="true" action="http://www.ijdky.net">
<input name="text" class="name" placeholder="Please Enter Name">
<!-- This Part is Where the user will type their name for the comment section-->
<br> <!-- Break -->
<br> <!-- Break -->
<style type="text/css"> textarea.html-text-box {background-color:white;background-repeat:no-repeat;background-attachment:fixed;border-width:4;border-style:solid;border-color:black;font-family:Georgia;font-size:16pt;color:black;}
input.html-text-box {background-color:ffffff;font-family:Georgia;font-size:12pt;color:000000;}
</style> <!-- The Comment Box -->
<textarea name="comments" cols="40" rows="10" class="html-text-box"></textarea>
<br> <!-- Break -->
<br> <!-- Break -->
<input type="submit" value="Submit Comment" class="html-text-box">
<br> <!-- Break -->
<br> <!-- Break -->
<input type="reset" value="Reset Comment" class="html-text-box">
</form>
</body>
</html>
我已經到處找,找不到任何東西。
謝謝。這工作。您是否是HTML5的真正專家?如果是的話,我應該去哪裏瞭解更多。我正在嘗試創建一個網站,並不確定如何將css頁面鏈接到HTML頁面。 – 2015-02-21 02:38:50
@DeQuanLynch - Mozilla網站[適用於開發人員的網絡技術](https://developer.mozilla.org/en-US/docs/Web)是一個很好的開始。 – 2015-02-22 04:43:30