๐Ÿ’ป

HTML ์˜ ์ดํ•ด - ๋ฉ€ํ‹ฐ๋ฏธ๋””์–ด ํ™œ์šฉ(img/audio/video) ๋ณธ๋ฌธ

KITRI/HTML

HTML ์˜ ์ดํ•ด - ๋ฉ€ํ‹ฐ๋ฏธ๋””์–ด ํ™œ์šฉ(img/audio/video)

๋˜ํšจ๋‹ˆ 2020. 5. 27. 15:15

<img> ํƒœ๊ทธ

https://www.w3schools.com/tags/tag_img.asp

 

HTML img tag

HTML Tag Example How to insert an image:

Girl in a jacket

Try it Yourself » More "Try it Yourself" examples below. Definition and Usage The tag is used to embed an image in an HTML page. Images are n

www.w3schools.com

 

- ์ƒ๋Œ€๊ฒฝ๋กœ

     ./  : ํ˜„์žฌ ํด๋”

     ../ : ์ƒ์œ„ ํด๋”

- ์ ˆ๋Œ€๊ฒฝ๋กœ

     ์ตœ์ดˆ์˜ ์‹œ์ž‘์ ์—์„œ ์ „๋ถ€ ๋‹ค 

 

 

[์ฐธ๊ณ ] ํ˜„์žฌํด๋”๋Š” ์ƒ๋žต์ด ๊ฐ€๋Šฅ (ํ—ท๊ฐˆ๋ฆฌ๋ฉด ๋ฌด์กฐ๊ฑด ํ‘œ์‹œ)

 

์™ธ๋ถ€ ์ด๋ฏธ์ง€ -> ์ด๋ฏธ์ง€ ๋งํฌ ๋ณต์‚ฌ๋กœ ๋งํฌ๋ฅผ ๋„ฃ์–ด์ค€๋‹ค(ํฌ๋กฌ ๋ธŒ๋ผ์šฐ์ €์—์„œ)

 

 

<audio> ํƒœ๊ทธ

 

https://www.w3schools.com/tags/tag_audio.asp

 

HTML audio tag

HTML Tag Example Play a sound file:

Try it Yourself » Definition and Usage The tag is used

www.w3schools.com

 

 

 

 

<video> ํƒœ๊ทธ

 

https://www.w3schools.com/tags/tag_video.asp

 

HTML video Tag

HTML Tag Example Play a video:

Try it Yourself » Definition and Us

www.w3schools.com

 

 

 

 

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>์ด๋ฏธ์ง€ ์˜ค๋””์˜ค ๋™์˜์ƒ</title>
</head>
<body>
	<!-- ์ƒ๋Œ€๊ฒฝ๋กœ
		 ./  : ํ˜„์žฌ ํด๋”
		 ../ : ์ƒ์œ„ ํด๋”  -->
	 <img src="./../../pengsoo.jpg" width="400" height="300" alt="์ด๋ฏธ์ง€ ์—†์Œ"/>
	 <img src="./../../../img/pengsoo.jpg" width="400" height="300" alt="์ด๋ฏธ์ง€ ์—†์Œ"/>
	 <img src="./../../../img/test/pengsoo.jpg" width="400" height="300" alt="์ด๋ฏธ์ง€ ์—†์Œ"/>
	 <br/>
	 <img src="https://t1.daumcdn.net/daumtop_chanel/op/20170315064553027.png"/>
	 <br/>
	 
	 <h3>์˜ค๋””์˜ค</h3>
	 <audio controls autoplay loop>
	 	<source src="./../../../img/test/Sleep Away.mp3" type="audio/mpeg">
	 </audio>
	 
	 <h3>๋น„๋””์˜ค</h3>
	 <video src="./../../../img/test/penguins.mp4" autoplay="autoplay" 
	 				controls="controls" type="video/mp4">
	 </video>
</body>
</html>
๋ฐ˜์‘ํ˜•
Comments