본문 바로가기
웹프로그래밍/HTML

HTML 텍스트 포멧팅(TEXT Formattiong) <b>, <strong>, <i>, <em>, <mark>, <small>, <del>, <ins>, <sub>, <sup> 사용법

by 유노brain 2023. 9. 5.
반응형
정리:
<b> - 굵은 텍스트 생성
<strong> - 중요한 텍스트 생성
<em> - 텍스트 강조(약간 기울어진 텍스트 생성)
<mark> - 텍스트 하이라이트 표
<small> - 텍스트를 작게 생성
<del> - 텍스트 삭제 선 표시
<ins> - 텍스트에 밑
<sub> - 텍스트 아래에 생성
<sup> - 텍스트 위에 생성

 

예시코드

<!DOCTYPE html>
<html>

<body>

    <p>This is normal text</p>
    <hr>
    <p><b>This is bold</b></p> 
    <hr>
    <p><strong>This is strong </strong></p>
    <hr>
    <p><em>This is emphasized</em></p>
    <hr>
    <p><small>This is smaller</small></p>
    <hr>
    <p>Do not forget to buy <mark>milk</mark> today.</p>
    <hr>
    <p>My favorite color is <del>orange</del> red.</p>
    <hr>
    <p>My favorite color is <del>orange</del><ins> red.</ins></p>
    <hr>
    <p>This is <sub>subscripted</sub> text.</p>
    <hr>
    <p>This is <sup>superscripted</sup> text.</p>
</body>

</html>

 

결과물

반응형

'웹프로그래밍 > HTML' 카테고리의 다른 글

HTML Form Elements  (0) 2023.09.07
HTML Form 속성  (0) 2023.09.07
HTML Forms  (0) 2023.09.05
HTML Iframes  (0) 2023.09.04
HTML 클래스 class  (0) 2023.09.04

댓글