2010-12-02 2 views
0

8 행 23 열 : 문서 유형에서 여기에 "STYLE"요소를 허용하지 않습니다. http://validator.w3.org/check에 입력하면 형식이 올바르지 않습니다. 나에게 오류를 준다. 누군가가 설명하거나 어쩌면 저에게 올바른 방법을 줄 수 있습니까?CSS를 사용하려고 할 때 내 페이지의 오류가 발생했습니다.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
     "http://www.w3.org/TR/html4/loose.dtd"> 

<html> 
<head> 
<title>Randy's first html web page !</title> 
</head> 
<style type="text/css"> 
body 
h1 

{ 
background-color:#6495aa; 
margin-right:1350px; 
} 

h2 
{ 
background-color:#b0c4de; 
margin-right:1350px; 
} 

p 
{ 
background-color:#649fff; 
margin-right:1350px; 
} 
div 
{ 
background-color:#efffff; 
} 

</style> 


<h1> Hello Professor</h1> 
<h2> By: Randy White</h2> 
<P> I haven't done anything like this before.</P> 
<P>Seems to be ok</P> 
<table border="1"> 
<tr> 
<th>Month</th> 
<th>Day</th> 
<th>Year</th> 
</tr> 
<tr> 
<td>December</td> 
<td>1</td> 
<td>2010</td> 
</tr> 
</table> 
<a href="http://www.google.com">Visit Google!</a> 
</body> 
</html> 

답변

1

스타일 태그는 head 태그에 있어야합니다.

+0

감사합니다. – user770022

+0

일정 제한을 기다려야합니다. 그것이 가능한 한 빨리 나는 체크 표시를 클릭 할 것이다. – user770022

0

style 요소 수 head의 하위 항목이 될 수 있습니다.

관련 문제