HTML <객체> 태그


예시

포함된 이미지:

<object data="pic_trulli.jpg" width="300" height="200"></object>

예시

포함된 HTML 페이지:

<object data="snippet.html" width="500" height="200"></object>

예시

포함된 비디오:

<object data="video.mp4" width="400" height="300"></object>

정의 및 사용

태그 는 <object>외부 리소스에 대한 컨테이너를 정의합니다.

외부 리소스는 웹 페이지, 사진, 미디어 플레이어 또는 플러그인 응용 프로그램일 수 있습니다.

<img>사진을 삽입하려면 태그 를 사용하는 것이 좋습니다 .

<iframe>HTML을 삽입하려면 태그 를 사용하는 것이 좋습니다 .

<video>동영상이나 오디오를 삽입하려면 및 <audio>태그 를 사용하는 것이 좋습니다 .


브라우저 지원

Element
<object> Yes Yes Yes Yes Yes

플러그인

<object>태그는 원래 브라우저 플러그인을 포함하도록 설계되었습니다 .

플러그인은 브라우저의 표준 기능을 확장하는 컴퓨터 프로그램입니다.

플러그인은 다양한 용도로 사용되었습니다.

  • 자바 애플릿 실행
  • ActiveX 컨트롤 실행
  • 플래시 동영상 표시
  • 지도 표시
  • 바이러스 검사
  • 은행 ID 확인

경고 !

대부분의 브라우저는 더 이상 Java 애플릿 및 플러그인을 지원하지 않습니다.

ActiveX 컨트롤은 더 이상 브라우저에서 지원되지 않습니다.

Shockwave Flash에 대한 지원도 최신 브라우저에서 해제되었습니다.


속성

Attribute Value Description
data URL Specifies the URL of the resource to be used by the object
form form_id Specifies which form the object belongs to
height pixels Specifies the height of the object
name name Specifies a name for the object
type media_type Specifies the media type of data specified in the data attribute
typemustmatch true/false Specifies whether the type attribute and the actual content of the resource must match to be displayed
usemap #mapname Specifies the name of a client-side image map to be used with the object
width pixels Specifies the width of the object

전역 속성

<object>태그는 HTML의 전역 속성도 지원 합니다 .


이벤트 속성

<object>태그는 HTML의 이벤트 속성 도 지원합니다 .


관련 페이지

HTML 자습서: HTML 개체 요소

HTML DOM 참조: 개체 개체


기본 CSS 설정

대부분의 브라우저는 <object>다음 기본값으로 요소를 표시합니다.

object:focus {
  outline: none;
}