본문 바로가기

HTML 단락(HTML Paragraphs)

HTML Paragraphs

The HTML <p> element defines a paragraph:

HTML <p>요소는 단락을 정의합니다 .


Example


1
2
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
cs


Try it Yourself »


Note: Browsers automatically add some white space (a margin) before and after a paragraph.

참고 : 브라우저는 단락 앞뒤에 공백을 자동으로 추가합니다 (여백).



HTML Display

HTML 표시


You cannot be sure how HTML will be displayed.

HTML이 어떻게 표시 될지 확신 할 수 없습니다.

Large or small screens, and resized windows will create different results.

크고 작은 화면과 크기가 조정 된 창은 다른 결과를 만듭니다.

With HTML, you cannot change the output by adding extra spaces or extra lines in your HTML code.

HTML을 사용하면 HTML 코드에 여분의 공백이나 여분의 줄을 추가하여 출력을 변경할 수 없습니다.

The browser will remove any extra spaces and extra lines when the page is displayed:

페이지가 표시 될 때 브라우저는 여분의 공백과 여분의 행을 제거합니다.


Example


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<p>
This paragraph
contains a lot of lines
in the source code,
but the browser 
ignores it.
</p>
 
<p>
This paragraph
contains         a lot of spaces
in the source         code,
but the        browser 
ignores it.
</p>
cs


Try it Yourself »



Don't Forget the End Tag

끝 태그를 잊지 마라.


Most browsers will display HTML correctly even if you forget the end tag:

대부분의 브라우저는 종료 태그를 잊어 버린 경우에도 HTML을 올바르게 표시합니다.


Example


1
2
<p>This is a paragraph.
<p>This is another paragraph.
cs


Try it Yourself »


The example above will work in most browsers, but do not rely on it.

위의 예제는 대부분의 브라우저에서 작동하지만, 의존하지는 않습니다.


Note: Dropping the end tag can produce unexpected results or errors.

참고 : 종료 태그를 삭제하면 예기치 않은 결과 또는 오류가 발생할 수 있습니다.



HTML Line Breaks

HTML 줄 바꿈


The HTML <br> element defines a line break.

HTML <br>요소는 줄 바꿈을 정의합니다 .

Use <br> if you want a line break (a new line) without starting a new paragraph:

<br>새 단락을 시작하지 않고 줄 바꿈 (새 줄)을 사용하려면 다음을 사용하십시오 .


Example


1
<p>This is<br>a paragraph<br>with line breaks.</p>
cs


Try it Yourself »


The <br> tag is an empty tag, which means that it has no end tag.

<br>태그는 끝 태그가 없음을 의미 빈 태그입니다.



The Poem Problem

시 문제


This poem will display on a single line:

이 시는 한 줄에 표시됩니다 :


Example


1
2
3
4
5
6
7
8
9
<p>
  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.
</p>
cs


Try it Yourself »



The HTML <pre> Element

HTML <pre> 요소


The HTML <pre> element defines preformatted text.

HTML <pre>요소는 서식이 미리 지정된 텍스트를 정의합니다.

The text inside a <pre> element is displayed in a fixed-width font (usually Courier), and it preserves both spaces and line breaks:

<pre>요소 내부의 텍스트 는 고정 너비 글꼴 (일반적으로 Courier)로 표시되며 공백과 줄 바꿈을 모두 유지합니다.


Example


1
2
3
4
5
6
7
8
9
<pre>
  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.
</pre>
cs


Try it Yourself »



Test Yourself with Exercises!


HTML Tag Reference

HTML 태그 참조


W3Schools' tag reference contains additional information about HTML elements and their attributes.

W3Schools 태그 참조에는 HTML 요소 및 해당 속성에 대한 추가 정보가 들어 있습니다.


Tag

 Description

 <p>

 Defines a paragraph

 단락을 정의합니다.

 <br>

 Inserts a single line break

 단일 줄 바꿈을 삽입합니다.

 <pre>

 Defines pre-formatted text

 미리 포맷 된 텍스트를 정의합니다.





'HTML' 카테고리의 다른 글

HTML 텍스트 서식 지정(HTML Text Formatting)  (0) 2018.06.08
HTML 스타일(HTML Styles)  (0) 2018.06.07
HTML 제목(HTML Headings)  (0) 2018.06.05
HTML 속성(HTML Attributes)  (0) 2018.06.04
HTML 요소(HTML Elements)  (0) 2018.06.03