티스토리 뷰

카테고리 없음

html , css 기초 정리

실전압축코딩 2023. 1. 22. 00:08

<ul> 순서가 중요하지 않음

<ol> 순서가 중요함

 

inline style -> html tag에 css 코드를 넣어주는 방식

internal style sheet -> head tag 안에 style tag를 둔다. css가 해당  html 문서에만 적용됨.  

linking stylee sheet 

 

css 선택자 -> 뒤에 것이 우선순위를 갖는다.  "구체적인 선택자가 우선순위를 갖는다. (더 많은 정보를 포함한)"

 

. 클래스 # id

p.blue -> p tag이면서 blue class를 가지고 있다. 

.blue.dark -> blue와 dark class를 둘다 가지고 있다. 

#id -> id 선택자.

span , .dark, #red -> group 선택자

 

 

자손 결합자 .outter > li -> 1촌 결합

동생 결합자 .outer ~ li -> 뒤따르는 모든 li tag 결합자 (자손 x)

바로 다음 동생 결합자 .outer +li 

 

가상 클래스

ol li:first-child -> 첫번째 자손

ol li:last-child -> 마지막 자손

 

.outer > li:not(:last-child)

 

ol li:nth-child(n) -> n번째 요소 가상 클래스

:empty -> 하위 tag가 존재 x

[attribue^=value] -> value 시작

[attribue$=[value] -> value로 끝남.

[attribute*=[value] -> value를 포함.