일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |
- Props
- 당근마켓
- github
- TypeScript
- Strict
- npm
- 0.25px border
- es6
- 1px border
- ZOOM
- 타입스크립트
- 서버리스 #
- 0.5px border
- TS
- &연산
- entity
- font-size
- 전역변수
- 문서번호
- 컴포넌튼
- 0.75px border
- 10px
- 으
- 데이터베이스 #try #이중
- Websocket
- ES5
- 클론코딩
- literal
- jwt
- angular
- Today
- Total
복잡한뇌구조마냥
HTML 공부 (HTML Character Entity) 본문
❓ HTML Entity란
HTML 엔터티는 &(ampersand) 로 시작하고 ;(semicolon)으로 끝나는 텍스트 조각 (문자열) 입니다.
- 특수문자나 공백문자를 작성하는데 주로 사용합니다.
- XSS 공격 방어 용도로도 사용할 수 있습니다.
- ex)
<script>alert("경고")</script>
<!--
→ <script>alert("경고")</script>
로 변경하면 html에서 자바스크립트로 동장하는 경우를 방어할 수 있음
-->
주로 사용하는 목록은 아래와 같습니다.
다른 HTML 엔터티 확인 경로:
https://html.spec.whatwg.org/multipage/named-characters.html#named-character-references
HTML Standard
HTMLLiving Standard — Last Updated 30 November 2023 ← 13.2 Parsing HTML documents — Table of Contents — 14 The XML syntax → 13.5 Named character references 13.5 Named character references This table lists the character reference names that are su
html.spec.whatwg.org
참고 자료 : https://developer.mozilla.org/en-US/docs/Glossary/Entity
Entity - MDN Web Docs Glossary: Definitions of Web-related terms | MDN
An HTML entity is a piece of text ("string") that begins with an ampersand (&) and ends with a semicolon (;). HTML entities are frequently used to display reserved characters (which would otherwise be interpreted as HTML code), and invisible characters (li
developer.mozilla.org
'FE > HTML' 카테고리의 다른 글
[HTML] HTML 메타 태그(meta tag) 종류 및 사용법 정리 (0) | 2024.11.07 |
---|---|
[HTML] 번역 방지 설정 – 크롬 자동 번역 막기 (0) | 2023.11.14 |
[HTML] HTML 공부 ( sub, sup 태그 ) (0) | 2023.07.10 |
[HTML] HTML 공부 (HTML 템플릿 자동완성 기능 - Emmet) (0) | 2023.06.02 |