HTML DOM 사전 개체
사전 개체
Pre 객체는 HTML <pre> 요소를 나타냅니다.
사전 개체에 액세스
getElementById()를 사용하여 <pre> 요소에 액세스할 수 있습니다.
예시
var x = document.getElementById("myPre");
사전 개체 만들기
document.createElement() 메서드를 사용하여 <pre> 요소를 만들 수 있습니다.
예시
var x = document.createElement("PRE");
사전 개체 속성
Property | Description |
---|---|
width | Not supported in HTML5. Use
style.width instead. Sets or returns the value of the width attribute of the preformatted text |
표준 속성 및 이벤트
관련 페이지
HTML 자습서: HTML 텍스트 서식 지정
HTML 참조: HTML <pre> 태그