본문 바로가기

오늘의 공부/html & css

2.HTML 스타일 적용

 

CSS파일을 두지 않고 HTML태그 내에서 어떤 속성을 주고 싶을 때 어떻게 해야할까?

 

<tagname style="property:value;">

태그 이름에 style=""을  붙이고 속성과 값을 입력해주면 된다.

 

예를 들어서 <strong>태그에  글씨 색을 회색으로 하고 싶다면

 

<strong  style="color:grey;">	

이런식으로  color라는 속성에  grey라는 값을 추가해주면 가능하다.

 

참고 사이트

https://www.w3schools.com/html/html_styles.asp

 

HTML Styles

HTML Styles The HTML Style Attribute Setting the style of an HTML element, can be done with the style attribute. The HTML style attribute has the following syntax: The property is a CSS property. The value is a CSS value.

www.w3schools.com

 

'오늘의 공부 > html & css' 카테고리의 다른 글

3.파비콘을 티스토리에 적용하기  (0) 2020.06.11
1.css: font-weight 2020년 2월7일  (0) 2020.02.07