본문 바로가기

HTML Iframes(HTML Iframes)

반응형

 

An iframe is used to display a web page within a web page.

iframe은 웹 페이지 내에 웹 페이지를 표시하는 데 사용됩니다.

 

chlehrb.tistory.com

 


Iframe Syntax

Iframe 구문

 

An HTML iframe is defined with the <iframe> tag:

HTML iframe은 다음 <iframe>태그 로 정의됩니다 .

 

1
<iframe src="URL"></iframe>
cs

 

The src attribute specifies the URL (web address) of the inline frame page.

src속성은 인라인 프레임 페이지의 URL (웹 주소)을 지정합니다.

 


Iframe - Set Height and Width

Iframe - 높이 및 너비 설정

 

Use the height and width attributes to specify the size of the iframe.

를 사용 height하고 widthiframe이의 크기를 지정하는 속성.

The attribute values are specified in pixels by default, but they can also be in percent (like "80%").

속성 값은 기본적으로 픽셀 단위로 지정되지만 백분율 (예 : "80 %") 일 수도 있습니다.

 

Example

1
<iframe src="demo_iframe.htm" height="200" width="300"></iframe>
cs

 

Try it Yourself »

 

Or you can use CSS to set the height and width of the iframe:

또는 CSS를 사용하여 iframe의 높이와 너비를 설정할 수 있습니다.

 

Example

1
<iframe src="demo_iframe.htm" style="height:200px;width:300px;"></iframe>
cs

 

Try it Yourself »

 


Iframe - Remove the Border

Iframe - 테두리 제거

 

By default, an iframe has a border around it.

기본적으로 iframe에는 테두리가 있습니다.

To remove the border, add the style attribute and use the CSS border property:

테두리를 제거하려면 style속성을 추가 하고 CSS border속성을 사용하십시오 .

 

Example

1
<iframe src="demo_iframe.htm" style="border:none;"></iframe>
cs

 

Try it Yourself »

 

With CSS, you can also change the size, style and color of the iframe's border:

CSS를 사용하면 iframe의 테두리 크기, 스타일 및 색상을 변경할 수도 있습니다.

 

Example

1
<iframe src="demo_iframe.htm" style="border:2px solid red;"></iframe>
cs

 

Try it Yourself »

 


Iframe - Target for a Link

Iframe - 링크 대상

 

An iframe can be used as the target frame for a link.

iframe은 링크 대상 프레임으로 사용할 수 있습니다.

The target attribute of the link must refer to the name attribute of the iframe:

target링크의 속성은 참조해야합니다 nameiframe을의 속성 :

 

Example

1
2
3
<iframe src="demo_iframe.htm" name="iframe_a"></iframe>
 
<p><a href="https://www.w3schools.com" target="iframe_a">W3Schools.com</a></p>
cs

 

Try it Yourself »

 


HTML iframe Tag

HTML iframe 태그

 

Tag   Description
 <iframe>   Defines an inline frame

 


Test Yourself with Exercises!


 

 

 

출처 : W3School.com

 

 

반응형