본문 바로가기
코딩/Html

<Img> tag

by Nemlord 2022. 8. 6.
  • <img> tag - 이미지 파일을 넣기위해 사용함
  • contains only attiributes
  • closing tag 없음
  • src - 이미지 파일의 위치를 지정함 

src=파일name

  • image file을 정의하는 방법 (같은 폴더에 있지 않을때에도)
    1. left-click the image
    2. click on properties
    3. now you can see "location"
    4. copy the location and paste it after the src attribute
    5. add "/" and then write the name of the picture +".jpg"
  • alt  - 이미지 파일의 부연설명, 구글 등 검색엔진에서 이 설명을 보고 올바른 사진이 사용되었는지 판단하므로 꼭 넣어주자.

  • 이미지 size조절 - width, height 

  • border - 이미지 주위로 경계표시

'코딩 > Html' 카테고리의 다른 글

<table>  (0) 2022.08.07
<a> tag  (0) 2022.08.07
ol, ul  (0) 2022.08.07
HTML - Attributes  (0) 2022.08.05

댓글