기본언어2000제
home
자바스크립트2000제
home

A0104출력문의활용_개념02_공백출력

개념

<script> /* [공백 출력] - 웹 브라우저는 기본적으로 여러 개의 공백을 하나의 공백으로 인식합니다. - 공백 한 칸 명령어는 &nbsp; 를 사용합니다. - &nbsp; 는 none-breaking space의 약자입니다. - 줄 바꿈이 일어나지 않는 공백 한 칸을 의미합니다. [공백 출력 형태] - &nbsp; */ document.write("공백 5칸"); document.write("<br>"); document.write("공백&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;5칸"); document.write("<br>"); </script>
HTML
복사

영상