HTML5 동영상강좌 바로가기 

댓글 목록

HTML 태그 - script

페이지 정보

작성자 운영자 작성일 14-12-11 14:39 조회 7,007 댓글 0

본문

 

HTML 태그 - script

<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> 

댓글목록 0

등록된 댓글이 없습니다.


HTML5 동영상강좌 바로가기