HTML, CSS

(24)CSS_Class선택자

빠스무 2023. 3. 29. 17:48
728x90
 

(15)CSS_기본 문법

CSS(Cascading Style Sheets) 웹 페이지의 특정 요소 또는 그룹에 적용할 스타일 그룹을 지정하는 규칙을 정의하는 언어 ✔ 참고 MDN: https://developer.mozilla.org/ko/ MDN Web Docs The MDN Web Docs site provides information a

jm-rograming.tistory.com

<!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>class 선택자</title>
    <style>
        .redstyle {color: red;}
        .bluestyle{color: blue;}
        #bigText{font-size: 40px;}
        .boldStyle{font-weight: bold;}
    </style>
</head>
<body>
    <h2 id="bigText">class 선택자</h2>
    <p><span class="redstyle boldStyle">클래스 선택자</span>는 특정 집단의 요소를 한번에 스타일을 적용합니다.<span class="redstyle">. 기호</span>
        사용해서<span class="bluestyle">
            같은 class 이름</span>을 가진 요소에 스타일을 적용합니다.</p>
    </p>
    <!-- class 두 개를 연결해서 쓸때는 띄어쓰기로 사용-->
</body>
</html>