<p style="color:blue;">This is a paragraph.</p>
This is a paragraph.
style 속성을 통해 css를 정의할 수 있다. 그러나 일반적으로 스타일은 외부 스타일 시트에 작성하고 link 요소로 연결하는 편이 좋다.
<p style="font-family:courier;">This is a paragraph.</p>
This is a paragraph.
style 속성을 통해 font-family를 각 태그에 설정해 줄 수 있다.
<p style="text-align:center;">This is a paragraph.</p>
This is a paragraph.
style 속성을 통해 text-align을 각 태그에 설정해 줄 수 있다.
<p style="font-size:50px;">This is a paragraph.</p>
This is a paragraph.
style 속성을 통해 font-size를 각 태그에 설정해 줄 수 있다.
<html>
<body style="background-color:yellow;">
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
This is a heading
This is a paragraph.
현재 벨로그에서는 확인되지 않지만 body에 style 속성을 지정하여 배경색을 바꿀 수 있다.
<html>
<body style="text-align:center;">
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
This is a heading
This is a paragraph.
현재 벨로그에서는 확인되지 않지만 body에 style 속성을 지정하여 하위 element의 text-align을 지정할 수 있다.