HTML_02_strong, u, h1~h6, br, p

charl hi·2021년 1월 8일
0

HTML

목록 보기
2/7

strong

  • 텍스트 굵게
  • to define text with strong importance. The content inside is typically displayed in bold.

예)

<strong>creating web pages</strong>

creating web pages


u

  • 텍스트에 밑줄 긋기 (underline)
  • display with an underline.

예)

creating <u>web</u> pages

creating web pages
엥 왜 여기선 밑줄이 안보일까



h1 ~ h6

  • 제목 (heading)
  • to define HTML headings.
  • <h1> defines the most important heading.
    <h6> defines the least important heading.

예)

<h1>h1</h1>
<h2>h2</h2>
<h3>h3</h3>
<h4>h4</h4>
<h5>h5</h5>
<h6>h6</h6>

h1

h2

h3

h4

h5
h6

br

  • 줄바꿈 (line breaking / line break)
  • inserts a single line break. to enter line breaks, not to add space between paragraphs.
  • 엔터의 효과와 같다. 쓰는 만큼 줄바꿈이 된다.
  • 닫는 태그가 없다.

예)

one<br>.two<br>.<br>three<br>.<br>.<br>fin.

one
.two
.
three
.
.
fin.


p

  • 단락 (paragraph)
  • defines a paragraph.
  • CSS를 통해 디자인(ex. 단락 간격 조정)
    -> br보다 p를 선호하는 이유 : p를 통해서 단락의 경계를 분명히 하면서, CSS를 통해서 p의 디자인을 자유롭게 변경할 수 있기 때문

예)

<p>My Bonnie lies over the ocean.</p>
<p style="margin-top:45px;">My Bonnie lies over the sea.</p>
<p style="margin-bottom:90px;">My Bonnie lies over the ocean.</p>
<p>Oh, bring back my Bonnie to me.</p>

margin = 여백
top(위)에 45픽셀만큼의 여백
bottom(아래)에 90픽셀만큼의 여백

My Bonnie lies over the ocean.

My Bonnie lies over the sea.

My Bonnie lies over the ocean.

Oh, bring back my Bonnie to me.


아니 왜 그대로 안보여주는데



Ref

0개의 댓글