본문 바로가기

HTML 주석(HTML Comments)


Comment tags are used to insert comments in the HTML source code.

주석 태그는 HTML 소스 코드에 주석을 삽입하는 데 사용됩니다.



HTML Comment Tags

HTML 덧글 태그


You can add comments to your HTML source by using the following syntax:

다음 구문을 사용하여 HTML 소스에 주석을 추가 할 수 있습니다.


1
<!-- Write your comments here -->
cs


Notice that there is an exclamation point (!) in the opening tag, but not in the closing tag.

열기 태그에는 느낌표 (!)가 있지만 닫기 태그에는 느낌표가 없습니다.


Note: Comments are not displayed by the browser, but they can help document your HTML source code.

참고 : 브라우저는 주석을 표시하지 않지만 HTML 소스 코드를 문서화하는 데 도움을 줄 수 있습니다.


With comments you can place notifications and reminders in your HTML:

의견을 통해 HTML에 알림 및 미리 알림을 추가 할 수 있습니다.


Example

1
2
3
<!-- This is a comment -->
<p>This is a paragraph.</p>
<!-- Remember to add more information here -->
cs


Try it Yourself »


Comments are also great for debugging HTML, because you can comment out HTML lines of code, one at a time, to search for errors:

HTML 코드 줄을 한 번에 하나씩 주석 처리하여 오류를 검색 할 수 있기 때문에 주석은 HTML 디버깅에도 유용합니다.


Example

1
2
3
<!-- Do not display this at the moment
<img border="0" src="pic_mountain.jpg" alt="Mountain">
-->
cs


Try it Yourself »



Test Yourself with Exercises!



출처 : W3School.com