HTML 사전

center

HTML 4부터 폐지예정

설명

The HTML Center Element (<center>) is a block-level element that can contain paragraphs and other block-level and inline elements. The entire content of this element is centered horizontally within its containing element (typically, the body). This tag has been deprecated in HTML 4 (and XHTML 1) in favor of the CSS text-align property, which can be applied to the <div> element or to an individual <p>.

<center> 요소는 블럭레벨 요소 입니다. 문단이나 블럭레벨, 인라인요소를 포함할 수 있습니다. <center>안의 모든 요소는 <center>를 감싸고 있는 요소(대개 body 요소)에 대해서 중앙으로 수평정렬됩니다. 이 태그는 <p>나 <div>요소에 CSS의 text-align 속성을 주는 것으로 대체가능하기 때문에 HTML4와 XHTML1에서 사용하지 않고 있습니다.

속성

Like all other HTML elements, this element supports the global attributes.

다른 모든 HTML 요소들과 같이, 이 요소는 전역속성을 지원한다.

예제

<center>이 문장은 중앙정렬 될 것임
<p>이 문단도 따라서 중앙정렬 되겠음</p></center>

아래와 같이 CSS로 대체해서 사용하길 권장함

<div style="text-align:center">이 문장은 중앙정렬 될 것임<p>이 문단도 따라서 중앙정렬 되겠음</p></div>
<p style="text-align:center">이 문장은 중앙정렬 될 것임<br /> 이 문장도 따라서 중앙정렬 되겠음</p>

DOM Interface

This element implements the HTMLElement interface.

이 요소는 HTMLElement 인터페이스를 구현한다.

참고

댓글

댓글 본문
버전 관리
토비
현재 버전
선택 버전
graphittie 자세히 보기