Web development
파일 분리 방법
WEB_CREASTORY
2023. 7. 10. 13:05
1. 파일 분리
<style> ~ </style> 부분이 너무 길어지면 코드를 한눈에 보기가 어렵다. 이럴 땐 파일을 분리해주는 것이 좋다.
style.css파일을 만들어 login.html에 있는 style을 style.css파일에 옮겨주고 >>
login.html에는
// <!-- style.css 파일을 같은 폴더에 만들고, head 태그에서 불러오기 -->
<link rel="stylesheet" type="text/css" href = "(css파일이름).css"> 넣어준다.
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" type="text/css" href = "style.css">
</head>
2. 라이브러리 : 인터넷에 있는 파일(코드 조각) 가져오기