1.设置图像宽度:width
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>图片标签</title>
</head>
<body>
<h4> width 给图像设定宽度</h4>
<img src="bg1.png" alt="风景" title="这是一张图片" width="500"/>
</body>
</html>
2.设置图像宽度:height
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>图片标签</title>
</head>
<body>
<h4> width 给图像设定高度</h4>
<img src="bg1.png" alt="风景" title="这是一张图片" height="500"/>
</body>
</html>
3.设置图像边框粗细:border
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>图片标签</title>
</head>
<body>
<h4> border 给图像设定边框</h4>
<img src="bg1.png" alt="风景" title="这是一张图片" height="500" border=15px/>
</body>
</html>