Old/소스코드
HTML에 css js 불러오기
Sinnak86
2016. 6. 9. 11:33
HTML css 및 js 불러오기
HTML head에 상대경로로 다운로드한 css js 불러오기
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="ko"> | |
<head> | |
<link rel="stylesheet" type="text/css" href="../assets/css/sinnak86.css"> | |
<script type="text/javascript" src="../assets/js/jquery-latest.js"></script> | |
<script src="../assets/js/admin.js"></script> | |
<meta charset="UTF-8"> | |
<title>css, js 상대경로로 지정 사용</title> | |
</head> | |
<body> | |
<h1>firstStep</h1> | |
<p>Hello World</p> | |
</body> | |
</html> |
※위 sinnak86.css 파일에 @import url(normalize.css); 를 하여 css 초기화를 하였다.
url 링크를 사용한 css js 불러오기
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css"> | |
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script> |
※위의 코드처럼 url로 파일을 별도로 다운받지 않고 사이트에서 제공하는 css 및 js 등 기타 파일들을 불러올수 있다