일반적으로 소스 코드를 복사한 경우
<iframe width="1280" height="720" src="https://www.youtube.com/embed/ImRjy0vgYoI" frameborder="0" allowfullscreen></iframe>
이렇다.
1. 소스 코드의 유튜브 주소 뒤에 ?autoplay=1 를 넣어준다.
<iframe width="1280" height="720" src="https://www.youtube.com/embed/ImRjy0vgYoI?autoplay=1" frameborder="0" allowfullscreen></iframe>
이렇게
2. 추가로 영상 크기를 변경하고 싶을 경우 width 와 height 옆에 종과 횡 크기 기입된것을 입맛따라 변경한다.
<iframe width="100" height="100" src="https://www.youtube.com/embed/ImRjy0vgYoI?autoplay=1" frameborder="0" allowfullscreen></iframe>
이렇게
완성품
![]() |
![]() |