HTML | Entity

크롱·2023년 3월 1일
0

HTML

목록 보기
5/6

📒 엔티티 Entity

HTML 소스를 보다보면 <, & 와 같은 요소들이 있다.
사실 이는 <&를 나타냄.

HTML은 <를 보면 문자로 여기지 않고 태그로 여겨서 에러가 날수도 있다. 이러한 특수 문자를 표현하기 위한 것이 HTML 엔티티!

< -- &lt;
> -- &gt;
띄어쓰기(공백) -- &nbsp;
& -- &amp;
" -- &quot;
' -- &apos;
© -- &copy;

👉 예시 :

<p>
A <strong>semantic element</strong> clearly describes its meaning to both the browser and the developer.
Examples of non-<strong>semantic elements</strong>:
&lt;div&gt; and &lt;span&gt; - 
Tells nothing ...
</p>
profile
👩‍💻안녕하세요🌞

0개의 댓글