<bdo>: 양방향 텍스트 재정의 요소 - HTML: Hypertext Markup Language | MDN

This page was translated from English by the community. Learn more and join the MDN Web Docs community.

View in English Always switch to English

<bdo>: 양방향 텍스트 재정의 요소

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015년 7월.

>

HTML <bdo> 요소는 현재 텍스트의 쓰기 방향을 덮어쓰고 다른 방향으로 렌더링 할 때 사용합니다.

시도해 보기

<h1>Famous seaside songs</h1>

<p>The English song "Oh I do like to be beside the seaside"</p>

<p>
  Looks like this in Hebrew:
  <span dir="rtl">אה, אני אוהב להיות ליד חוף הים</span>
</p>

<p>
  In the computer's memory, this is stored as
  <bdo dir="ltr">אה, אני אוהב להיות ליד חוף הים</bdo>
</p>
html {
  font-family: sans-serif;
}

/* stylelint-disable-next-line block-no-empty */
bdo {
}

특성

이 요소는 전역 특성을 포함합니다.

dir

요소 콘텐츠의 텍스트 쓰기 방향. 가능한 값은 다음과 같습니다.

  • ltr: 텍스트를 왼쪽에서 오른쪽으로 써야 함을 나타냅니다.
  • rtl: 텍스트를 오른쪽에서 왼쪽으로 써야 함을 나타냅니다.

예제

html
<!-- 쓰기 방향 바꾸기 -->
<p>이 글은 왼쪽에서 오른쪽으로 작성합니다.</p>
<p><bdo dir="rtl">이 글은 오른쪽에서 왼쪽으로 작성합니다.</bdo></p>

결과

명세

Specification
HTML>
# the-bdo-element>

브라우저 호환성