<script>태그는 웹문서안에 실행이 가능한 스크립트를 넣거나 외부스크립트를 참조할 때 사용합니다.
src : 외부 스크립트를 참조할 때 해당 스크립트의 위치를 지정합니다.
type : 스크립트를 코드의 MIME 타입을 지정합니다. 지정되지 않으면 JavaScript로 간주합니다.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="author" content="코리아뉴스" />
<title> html공부 </title>
<link rel="stylesheet" type="text/css" href="default.css" / >
<style type="text/css">
body {
color:red;
}
</style>
<script type="text/javascript" src="sample.js"> </script>
</head>
<body>
<section>
<h1>script태그</h1>
<p>외부 스크립트 적용 예.</p>
</section>
<div id="related">
<p>영역 </p>
</div>
<footer>
<address> 전화 : 031-574-3659, E-mail : master@koreanews.com </address>
Copyright ⓒ 2013 Koreanews co., All Rights Reserved.
</footer>
</body>
</html>
등록된 댓글이 없습니다.