<img>遇到问题
初学html一枚!
<body>
<span class=lyrics align="center">
<img src="Sparks fly.jpg" alt="<img>遇到有关问题" width="500" height="500" border="1" />
Sparks Fly
</span>
Taylor Swift
The way you move is like a full on rainstorm
And I'm a house of cards
Your the kinda reckless that should send me run
But I kinda know that I won't get far
</body>
求问为什么图片不能被文字包围?而且alt没有作用?
[解决办法]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
#cover{width:100px;height:auto;background-color:#f00;}
img{float:left;display:block;background-color:#ddd;font-size:8px}
</style>
</head>
<body>
<div id="cover">
<img src="Sparks fly.jpg" alt="<img>遇到有关问题" width="50" height="50" border="1" />
Taylor Swift
The way you move is like a full on rainstorm
And I'm a house of cards
Your the kinda reckless that should send me run
But I kinda know that I won't get far
</div>
</body>
</html>