# img標籤 ###### tags: `Html 標籤` ```htmlembedded= <!---需求1:使用img顯示照片,並修改寬高,和邊框屬性 img是圖片標籤,用來顯示圖片 src屬性可以設置圖片路徑 width屬性設置圖片的寬度 height屬性設置圖片的高度 border屬性設置圖片的邊框 alt屬性設置當指定路徑找不到圖片時,用來代替顯示的文本內容 在javase中,路徑也分成相對路徑和絕對路徑 相對路徑:從工程名開始算 絕對路徑:盤符:/目錄/文件名 在web中,路徑分成相對路徑和絕對路徑 相對路徑: . 表示當前文件所在的目錄 .. 表示當前文件所在的上一級目錄 文件名 表示當前文件所在目錄的文件,相當於 ./ 文件名(./可省略) 絕對路徑: 正確格式:http://ip:port/工程名/資源路徑 錯誤格式:盤符:/目錄/文件名 --> <img src="../imgs/1.jpg" width="200" height="200" border="10" alt="美女找不到"/> <img src="../imgs/2.jpg" width="200" height="200"/> <img src="../imgs/3.jpg" width="200" height="200"/> <img src="../imgs/4.jpg" width="200" height="200"/> <img src="../imgs/5.jpg" width="200" height="200"/> <img src="../imgs/6.jpg" width="200" height="200"/> ``` 
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up