2016-06-12 7 views
-1

CSS 태그가 포함 된 html 파일도 실행하려고합니다. 하지만 출력에서는 HTML 태그의 출력 만 볼 수 있고 CSS 태그는 볼 수 없습니다. 모든 브라우저에서이 문제를 시도했지만 문제가 무엇인지 알 수 있습니까? 여기 CSS 스크립트가 작동하지 않습니다.

<?xml version=”1.0” encoding=”UTF-16”?> 
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.1//EN” 
“http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd”> 
<html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”en”> 
<head> 
<title>Bohemia</title> 
</head> 
<body> 
<div style=”text-align:center”> 
<h1>Bohemia</h1> 
<h2>by Dorothy Parker</h2> 
</div> 
<p style=”text-align:left”> 
Authors and actors and artists and such<br /> 
Never know nothing, and never know much.<br /> 
Sculptors and singers and those of their kidney<br /> 
Tell their affairs from Seattle to Sydney. 
</p> 
<p style=”text-align:center”> 
Playwrights and poets and such horses’ necks<br /> 
Diarists, critics, and similar roe<br /> 
Never say nothing, and never say no. 
</p> 
<p style=”text-align:right”> 
People Who Do Things exceed my endurance;<br /> 
God, for a man that solicits insurance! 
</p> 
</body> 
</html> 

(출력) CSS 정렬 태그가 작동되지 않습니다

여기 내 파일입니다.

답변

0

사용중인 인용문이 잘못되었습니다. 대신 '사용'또는보십시오 : 그래서 스타일이 생각입니다 <div style="”text-align:center”"></div>으로이

<div style=”text-align:center”>, 

의 대신

<!DOCTYPE html> 
 
    <html> 
 
    <head> 
 
     <meta charset="utf-8"> 
 
     <meta name="viewport" content="width=device-width"> 
 
     <title>Bohemia</title> 
 
    </head> 
 
    <body> 
 
    <div style=”text-align:center”> 
 
    <h1>Bohemia</h1> 
 
    <h2>by Dorothy Parker</h2> 
 
    </div> 
 
    <p style='text-align:left'> 
 
    Authors and actors and artists and such 
 
    Never know nothing, and never know much. 
 
    Sculptors and singers and those of their kidney 
 
    Tell their affairs from Seattle to Sydney. 
 
    </p> 
 
    <p style='text-align:center'> 
 
    Playwrights and poets and such horses’ necks 
 
    Diarists, critics, and similar roe 
 
    Never say nothing, and never say no. 
 
    </p> 
 
    <p style='text-align:right'> 
 
    People Who Do Things exceed my endurance; 
 
    God, for a man that solicits insurance! 
 
    </p> 
 
    </body> 
 
    </html>

0

사용 <div style='text-align:center'>을 우리는이 같은 <div style=”text-align:center”>를 사용하는 경우, 브라우저 받아 ("") 또는 ('')이 아닌 (")

관련 문제