본문 바로가기

HTML 개체(HTML Entities)


Reserved characters in HTML must be replaced with character entities.

HTML의 예약 문자는 문자 엔티티로 대체되어야합니다.

Characters that are not present on your keyboard can also be replaced by entities.

키보드에없는 문자는 엔티티로 바꿀 수 있습니다.



HTML Entities

HTML 개체


Some characters are reserved in HTML.

일부 문자는 HTML로 예약되어 있습니다.

If you use the less than (<) or greater than (>) signs in your text, the browser might mix them with tags.

텍스트에서보다 작음 (<) 또는보다 큼 (>) 기호를 사용하면 브라우저가 태그와 혼합 할 수 있습니다.

Character entities are used to display reserved characters in HTML.

문자 엔티티는 HTML에 예약 된 문자를 표시하는 데 사용됩니다.

A character entity looks like this:

문자 엔티티는 다음과 같습니다.


&entity_name;

OR

&#entity_number;


To display a less than sign (<) we must write: &lt; or &#60;

보다 작음 부호 (<)를 표시하려면 다음을 작성해야합니다. & lt; 또는 & # 60;


Advantage of using an entity name : An entity name is easy to remember.

엔티티 이름 사용의 장점 : 엔티티 이름은 쉽게 기억할 수 있습니다. 

Disadvantage of using an entity name : Browsers may not support all entity names, but the support for numbers is good.

엔티티 이름 사용의 단점 : 브라우저는 모든 엔티티 이름을 지원하지는 않지만 숫자에 대한 지원은 유용합니다.



Non-breaking Space

비 분리 공간


A common character entity used in HTML is the non-breaking space: &nbsp;

HTML에 사용되는 일반적인 문자 엔티티는 비 분리 영역입니다. & nbsp;

A non-breaking space is a space that will not break into a new line.

비 분리 공간은 새로운 행으로 깨지지 않는 공간입니다.

Two words separated by a non-breaking space will stick together (not break into a new line). This is handy when breaking the words might be disruptive.

비 분리 공간으로 구분 된 두 단어가 서로 붙습니다 (새 줄을 끊지 않음). 단어를 깨뜨리는 것이 방해가 될 때 유용합니다.


Examples:

  • § 10
  • 10 km/h
  • 10 PM

Another common use of the non-breaking space is to prevent browsers from truncating spaces in HTML pages.

비 구분 영역의 또 다른 일반적인 용도는 HTML 페이지에서 브라우저가 공백을 잘라 내지 않도록 방지하는 것입니다.

If you write 10 spaces in your text, the browser will remove 9 of them. To add real spaces to your text, you can use the &nbsp; character entity.

텍스트에 10 개의 공백을 쓰면 브라우저에서 9 개의 공백을 제거합니다. 텍스트에 실제 공간을 추가하려면 & nbsp; 문자 엔티티.


The non-breaking hyphen (&#8209;) lets you use a hyphen character (‑) that won't break.

중단없는 하이픈 ( & # 8209; )을 사용하면 중단되지 않는 하이픈 문자 (-)를 사용할 수 있습니다.



Some Other Useful HTML Character Entities

기타 유용한 HTML 문자 엔터티


Result Description Entity Name Entity Number
non-breaking space &nbsp; &#160;
< less than &lt; &#60;
> greater than &gt; &#62;
& ampersand &amp; &#38;
" double quotation mark &quot; &#34;
' single quotation mark (apostrophe) &apos; &#39;
¢ cent &cent; &#162;
£ pound &pound; &#163;
¥ yen &yen; &#165;
euro &euro; &#8364;
© copyright &copy; &#169;
® registered trademark &reg; &#174;


Note: Entity names are case sensitive.

참고 : 엔티티 이름은 대 / 소문자를 구분합니다.



Combining Diacritical Marks

분별 기호 결합


A diacritical mark is a "glyph" added to a letter.

분음 기호는 문자에 추가 된 "글리프 (glyph)"입니다.

Some diacritical marks, like grave (  ̀) and acute (  ́) are called accents.

grave () 및 acute ()와 같은 일부 분음 부호는 악센트라고합니다.

Diacritical marks can appear both above and below a letter, inside a letter, and between two letters.

분음 기호는 문자 위나 아래, 문자 안에, 그리고 두 글자 사이에 나타날 수 있습니다.

Diacritical marks can be used in combination with alphanumeric characters to produce a character that is not present in the character set (encoding) used in the page.

분음 기호는 영숫자 문자와 함께 사용하여 페이지에 사용 된 문자 세트 (인코딩)에없는 문자를 생성 할 수 있습니다.

Here are some examples:

여기 몇 가지 예가 있어요.


Mark Character Construct Result
 ̀ a a&#768;
 ́ a a&#769;
̂ a a&#770;
 ̃ a a&#771;
 ̀ O O&#768;
 ́ O O&#769;
̂ O O&#770;
 ̃ O O&#771;


You will see more HTML symbols in the next chapter of this tutorial.

이 자습서의 다음 장에서 더 많은 HTML 기호를 볼 수 있습니다.




출처 : w3schools.com