반응형
id selector
#green {color: green}
p#para1
{
text-align: center;
color: red
}
p#exampleID1 { background-color: white; }
p#exampleID2 { text-transform: uppercase; }
<h1 id="green">Good Morning</h1>
<p id="para1">Hello</p>
<p id="ExampleID1">This paragraph has an ID name of
"exampleID1" and has a white CSS defined background</p>
<p id="ExampleID2">This paragraph has an ID name of
"exampleID2" and has had its text transformed to uppercase letters. </p>
Selectors can be contextual
<html>
<head>
<style type="text/css">
H2 { font-style: italic; color:green}
H2 I, H2 EM { font-style: normal }
</style>
</head>
<body>
<P>This paragraph has <I>Italics</I>
<H2>This heading has <I>Italics</I> too</H2>
</body>
</html>
반응형
'Devlopment > Web' 카테고리의 다른 글
Application 내장 객체 (0) | 2008.06.29 |
---|---|
Forward & Redirect & Include (0) | 2008.06.29 |
파라미터 값 받기 & 한글 처리 (0) | 2008.06.29 |
JSP Page Directive (0) | 2008.06.29 |
class vs. id (0) | 2008.06.25 |
Grouping & Add Styles to Elements with Particular Attributes (0) | 2008.06.25 |
Pseudo-Class Selector & CSS 글꼴 꾸밈관련 스타일 (0) | 2008.06.25 |
css link (0) | 2008.06.25 |
주민등록번호 검사 (0) | 2008.06.25 |
HTML Event (0) | 2008.06.25 |