자바스크립트 수업 내용 정리
css 스타일 없는 웹 페이지
<!DOCTYPE html>
<html lang="en">
<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>스타일 없는 웹페이지</title>
</head>
<body>
<h3>css 스타일 맛보기</h3>
<hr>
<p>나는 <span>웹프로그래밍</span>을 좋아한다.</p>
</body>
</html>
css 스타일 적용한 웹 페이지
<!DOCTYPE html>
<html lang="en">
<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>스타일 없는 웹페이지</title>
<style>
/* CSS style sheet 작성 select */
body{
background-color: mistyrose;
}
h3{
color: purple;
}
hr{
border: 5px solid yellowgreen;
}
span{
color: blue;
font-size: 20px;
}
</style>
</head>
<body>
<h3>css 스타일 맛보기</h3>
<hr>
<p>나는 <span>웹프로그래밍</span>을 좋아한다.</p>
</body>
</html>
style 속성에 스타일 시트 만들기1
<!DOCTYPE html>
<html lang="en">
<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>
<style>
p{
color: red;
font-size: 15px;
}
</style>
</head>
<body>
<h3>손 흥 민</h3>
<hr>
<p>
오페라를 좋아하고
</p>
<p>
엘비스 프레스리를 좋아하고
</p>
<p style="color:blue">
김치부침개를 좋아하고
</p>
<p style="font-size:50px;color:magenta">
축구를 좋아합니다.
</p>
</body>
</html>
자식 셀렉터와 자손 셀렉터
<!DOCTYPE html>
<html lang="en">
<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>
<style>
ul strong{
background-color: yellow;
color: dodgerblue;
}
div>strong{
background-color: rgb(248, 203, 203);
}
</style>
</head>
<body>
<h2>👀Web Promgramming💖</h2>
<hr>
<div>
<div>2학기 <strong>학습내용</strong></div>
<ul>
<li>HTML5</li>
<li><strong>CSS</strong></li>
<li>Javascript</li>
</ul>
<div>60점 이하는 F!</div>
</div>
</body>
</html>
Leave a comment