프런트엔드-CSS

CSS 스타일링

강사: 최퍼블리셔 · 작성자: 이종춘 · 작성일: 2026-03-30 16:02:31 · 조회수: 20

스타일시트 요소 설명
목록으로
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>

<style>

/* *요소(Element)
1.block
=>지정한 크기값에 맞춰서 엘리먼트 크기가 지정됨
=>알수없는 여백값이 없음
=>기본적으로 가로값이 가득차있음(눈에 안보이는 여백)
=>div, p, h1-h6, ul, li 등

2.inline
=>크기를 지정해도 적용되지 않음
=>알수없는 여백값이 있음
=>a, b, i, strong, b, u 등 */


.block{
width: 200px;
height: 200px;
background-color: cornflowerblue;
font-size: 30px;
text-align: center;
line-height: 200px;
/* *border 축약
=>border: 두께 선종류 선색상
=>한줄로 띄어쓰기로 구분함 */
border: 10px solid #000;
display: inline;
}

a{
width: 200px;
height: 200px;
background-color: gold;
font-size: 30px;
text-align: center;
line-height: 200px;
border: 10px solid salmon;
display: block;
}

</style>

</head>
<body>

<div class="block">블럭 요소</div>
<div class="block">블럭 요소</div>

<a href="#">인라인 요소</a>
<a href="#">인라인 요소</a>

</body>
</html>
#스타일시트 요소

첨부 파일

0개
첨부된 파일이 없습니다.

댓글 / 답글

0개
댓글을 작성하려면 로그인하세요.
아직 댓글이 없습니다.