JavaScript 5일차 - CSS기초 2
2021. 12. 23. 15:14ㆍ코딩공부/JavaScript
CSS기초 2
- style 태그
선택자
<div>태그 : css를 입히기 위해 아무 의미도 기능도 없이 제어를 위해 감싸주는 태그 / 줄바꿈 있음
<span>태그 : 위와 동일/ 줄바꿈 없음
css text bold를 검색해보자
https://www.w3schools.com/cssref/pr_font_weight.asp
<span style="font-weight: bold;">고용보험</span>
만약 html문서중 1억개가 들어가있는 어떤 특정 단어의 스타일을 일괄적으로 바꾸고싶다면?
<style>태그 : 안의 내용이 css다라고 웹브라우저에게 알려주는 구분자
<span class="js">실업급여</span>
로 묶어주고 스타일 태그 안에 js를 사용하여 일괄적으로 바꿀 수 있다.
'코딩공부 > JavaScript' 카테고리의 다른 글
JavaScript 7일차 - 제어할 태그 선택하기 (0) | 2021.12.25 |
---|---|
JavaScript 6일차 - CSS 기초 3 (0) | 2021.12.24 |
JavaScript 4일차 - 웹브라우저 제어 / CSS 기초 (0) | 2021.12.22 |
JavaScript 3일차 - 데이터타입 문자열과 숫자 / 변수와 대입 연산자 (0) | 2021.12.21 |
JavaScript 2일차 - HTML과 JS의 만남 (콘솔) (0) | 2021.12.19 |