본문 바로가기
HTML

[HTML] 영상을 마크업에 추가하는 방법-2(iframe)

by 여니노트 2022. 3. 23.
728x90
반응형

<video>

<iframe> 태그 이용

  • iframe을 이용하면 현재 웹 페이지 안에 또 다른 웹 페이지 삽입이 가능하므로 외부 링크로 전달받은 경우.
  • iframe : inline frame의 약자.
  • 대표적인 링크 : 유튜브 링크, 카카오TV 링크, 네이버TV 링크 등등.

  • 지원 브라우저
    Browser iframe
    IE O
    Edge O
    Chrome O
    Firefox O
    Safari O
    Opera O

 

예시 코드

<!DOCTYPE html>
<html lang="ko">
<head>
    <meta charset="UTF-8">
</head>
<body>
    <iframe src="https://www.youtube.com/embed/id값" title="영상 타이틀"></iframe>
    <iframe src="https://play-tv.kakao.com/embed/player/cliplink/id값" title="영상 타이틀"></iframe>
    <iframe src="https://tv.naver.com/embed/id값" title="영상 타이틀"></iframe>
</body>
</html>

 

 

[참고자료]

- <iframe> : https://caniuse.com/?search=iframe 

 

"iframe" | Can I use... Support tables for HTML5, CSS3, etc

seamless attribute for iframes The seamless attribute makes an iframe's contents actually part of a page, and adopts the styles from its hosting page. The attribute has been removed from both [the WHATWG](https://github.com/whatwg/html/issues/331) and [the

caniuse.com

728x90
반응형

댓글