Example code for using HTML ul and li tags to display images

Example code for using HTML ul and li tags to display images
Copy the following code to the code area of ​​Dreamweaver, and the following image will be displayed during preview, realizing the image display function.

Copy code
The code is as follows:

<!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=gb2312" />
<style type="text/css">



Copy code
The code is as follows:

<!--The following defines the CSS style, including a div, i.e. layout, and tags such as ul, li, img, etc. -->
<span style="color:#990000;">#layout{width:700px;border:2px solid #ccc;padding:2px;overflow:auto;zoom:1;diaplay:inline;}
#layout ul{list-style:none;}
#layout li {
list-style-type: square;
no-repeat 0px 4px;
padding-left:20px;
}
body{margin:0 auto;font-size:12px;font-family:Verdana;line-height:1.5;}
ul,dl,dt,dd,h1,h2,h3,h4,h5,h6,form{padding:0;margin:0;}
img{border:0px;}
#layout ul li a img {
padding: 1px;
border: 1px solid #elelel;
margin-bottom:3px;
display:block;
}
a{color:#05a;text-decoration:none;}
a:hover{color:#f00;}
#layout ul li {
float: left;
width: 72px;
margin-top: 20px;
margin-right: 0px;
margin-bottom: 0px;
margin-left: 20px;
text-align: center;
}
#layout ul li a {
display: block;
}
#layout ul li a:hover img {
padding: 0px;
border: 2px solid #FF6600;
}</span>
</style>
</head>
<body>
<div id="layout">


Copy code
The code is as follows:

<!--The following is to define the image as a li tag and set the height and width. You only need to modify the src path and image name 001.jpg where the image is placed-->
<ul>
<span style="color:#993300;"><li><a href="#"><img src="images/001.jpg"width="70" height="70"/>Sanya</a></li>
<li><a href="#"><img src="images/001.jpg"width="70" height="70"/>Sanya</a></li>
<li><a href="#"><img src="images/001.jpg"width="70" height="70"/>Sanya</a></li>
<li><a href="#"><img src="images/001.jpg"width="70" height="70"/>Sanya</a></li>
<li><a href="#"><img src="images/001.jpg"width="70" height="70"/>Sanya</a></li>
<li><a href="#"><img src="images/001.jpg"width="70" height="70"/>Sanya</a></li>
<li><a href="#"><img src="images/001.jpg"width="70" height="70"/>Sanya</a></li>
<li><a href="#"><img src="images/001.jpg"width="70" height="70"/>Sanya</a></li>
<li><a href="#"><img src="images/001.jpg"width="70" height="70"/>Sanya</a></li>
<li><a href="#"><img src="images/001.jpg"width="70" height="70"/>Sanya</a></li>
<li><a href="#"><img src="images/001.jpg"width="70" height="70"/>Sanya</a></li>
<li><a href="#"><img src="images/001.jpg"width="70" height="70"/>Sanya</a></li>
<li><a href="#"><img src="images/001.jpg"width="70" height="70"/>Sanya</a></li>
<li><a href="#"><img src="images/001.jpg"width="70" height="70"/>Sanya</a></li>
<li><a href="#"><img src="images/001.jpg"width="70" height="70"/>Sanya</a></li></span>
</ul>
</div>
</body>
</html>

<<:  JavaScript selector functions querySelector and querySelectorAll

>>:  MySQL 5.7 Common Data Types

Recommend

MySQL installation and configuration tutorial for Mac

This article shares the MySQL installation tutori...

CentOS7 uses yum to install mysql 8.0.12

This article shares the detailed steps of install...

Django+mysql configuration and simple operation database example code

Step 1: Download the mysql driver cmd enters the ...

Detailed summary of MySQL and connection-related timeouts

MySQL and connection related timeouts Preface: To...

Nginx 502 Bad Gateway Error Causes and Solutions

I have encountered the Nginx 502 Bad Gateway erro...

mysql5.7.22 download process diagram

1. Go to the official website www.mysql.com and s...

What are the benefits of semantic HTML structure?

one: 1. Semantic tags are just HTML, there is no ...

A brief introduction to bionic design in Internet web design

When it comes to bionic design, many people will t...

Alpine Docker image font problem solving operations

1. Run fonts, open the font folder, and find the ...

How to notify users of crontab execution results by email

symptom I set a crontab task on a centos7 host, b...

Organize the common knowledge points of CocosCreator

Table of contents 1. Scene loading 2. Find Node 1...

How Web Designers Create Images for Retina Display Devices

Special statement: This article is translated bas...

How to modify the "Browse" button of the html form to upload files

Copy code The code is as follows: <!DOCTYPE HT...

Detailed explanation of using grep command in Linux

Linux grep command The Linux grep command is used...