본문 바로가기
study/Html

[Html] 5. CSS (글자스타일 지정하기 : <color>, <text-shadow>, <font-size>, <font-family>, <line-height>, <font-weight>, <text-decoration>)

by 금이패런츠 2022. 4. 4.
728x90
반응형
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>

<style type="text/css">
/* h2 태그의 색상(color)을 파랑색(blue)으로하고 음영(text-shadow)주기*/
	h2 { 
		color : blue; /*글자의 색상*/
		text-shadow : 2px 2px 10px gray; /*글자의 음영*/
	}
/* p 태그의 색상(color)을 #444444으로하고 글자크기(font-size), 글꼴(font-family), 간격(line-height) 변경하기*/	
	p {
		color : #444444; /*글자의 색상*/
		font-size: 18px; /*글자의 크기*/
		font-family: '바탕'; /*글꼴*/
		line-height: 150%; /*라인 사이의 간격*/
	}
/* span 태그의 색상(color)을 #0e9bdc으로하고 진하게(font-weight), 밑줄긋기(text-decoration) */	
	span {
		color : #0e9bdc; /*글자의 색상*/
		font-weight : bold;
		text-decoration: underline;
	}
</style>
</head>
<body>
<h2>세렝게티 국립공원</h2>
<p><span>탄자니아의 킬리만자로산 서쪽</span>에 위치한 세렝게티(Serengeti)의 
광활한 평원은 면적이 1,500,000㏊이며, 사바나 지역에 있습니다. 
<span>사자, 코끼리, 들소, 얼룩말</span> 
등 약 300만 마리의 대형 포유류가 살고 있습니다.</p>
</body>
</html>
728x90
반응형