본문 바로가기

HTML5 tag 기본태그

HTML5 Images 이미지태그

이미지 태그 종류 입니다.


<img src="주소.jpg" alt="이미지">


<img src="주소.jpg" alt="이미지" width="500" height="600">


<img src="주소.jpg" alt="이미지">


<img src="주소.jpg" alt="이미지" style="width:500px;height:600px;">


-----------------------------------------------

<!DOCTYPE html>

<html>
<head>
<style>
img { 
  width: 100%; 
}
</style>
</head>
<body>

<img src="html5.gif" alt="HTML5 Icon" width="128" height="128">
<img src="html5.gif" alt="HTML5 Icon" style="width:128px;height:128px;">

</body>
</html>

--------------------------------------------------

이미지 맵 태그


<img src="workplace.jpg" alt="Workplace" usemap="#workmap">


<map name="workmap">
  <area shape="rect" coords="34,44,270,350" alt="Computer" href="computer.htm">
  <area shape="rect" coords="290,172,333,250" alt="Phone" href="phone.htm">
  <area shape="circle" coords="337,300,44" alt="Coffee" href="coffee.htm">
</map>

-------------------------------------------------------------


스타일에 이미지 태그를 넣는 방법도 있습니다

<!DOCTYPE html>

<html>

<head>

<style>

#home {

  width: 46px;

  height: 44px;

  background: url(img_navsprites.gif) 0 0;

}


#next {

  width: 43px;

  height: 44px;

  background: url(img_navsprites.gif) -91px 0;

}

</style>

</head>


'HTML5 tag 기본태그' 카테고리의 다른 글

html5 블록, inline요소  (0) 2019.07.11
html 리스트 목록 태그  (0) 2019.07.11
HTML5 링크 태그  (0) 2019.07.10
html5 색상 태그  (0) 2019.07.10
html5 기본 style 태그  (0) 2019.07.10