HTML 유효성 테스트를 했더니,
관련링크
본문
Error: A document must not include both a
meta
element with anhttp-equiv
attribute whose value iscontent-type
, and ameta
element with acharset
attribute.From line 6, column 1; to line 6, column 67
="utf-8">↩<meta http-equiv="content-type" content="text/html; charset=utf-8">↩<meta
Error:
script
element betweenhead
andbody
.From line 18, column 1; to line 18, column 31
↩↩</head>↩<script type="text/javascript">↩// 자바
Fatal Error: Cannot recover after last error. Any further errors will be ignored.
From line 18, column 1; to line 18, column 31
↩↩</head>↩<script type="text/javascript">↩// 자바
위와 같은 에러 문구가 뜨는데,
바람직하게 고쳐주려면 어떻게 변경해줘야 할까요?
답변 1
1. html5 문법에 맞게
<meta charset="utf-8"> 만 있으면 됩니다.
아래행은 삭제해주세요.
<meta http-equiv="content-type" content="text/html; charset=utf-8">
2. 스크립트들을 </head> 안으로 넣어주세요.
3. 2와 동일한 이유로 보입니다.