css공부하다가 질문이 있습니다
차미
2023.04.01
제가 css공부하다가 이해가 안되는 부분이 잇어서 질문이 있습니다
(제가 책 보면서 짠거 복사한 겁니다)
html
head
style type=text/css
p{width:320px; text-align:center;}
p.test1{border-style:solid; float:left; border-width:10px;
border-color:red; margin:100px;}
p.test2{border-style:solid; float:left; border-width:10px;
border-color:red; margin-left:200px;}
/style
/head
body
h1 스타일 시트 적용하기/h1brbrhr
p class=test1 margin:100px/phr
p class=test2margin-left:200px/phr/body
여기서 p{width:320px; text-align:center;}이 부분은 p태그에 대한 설정으로 보고 있는데
바로 밑 p.test1태그에서 float:left는 왜 있는 것인지 것인지 모르겠습니다
제가 완전 초보라서 그러니 알기 쉽게 설명해주시면 감사하겠습니다