HTML image
HTML Image

#<img> ; ->image image
<img src="//m.sbmmt.com/global/code/url" alt="some_text">
<img src="//m.sbmmt.com/global/code/../style/images/boat.gif" alt="Big Boat">
The image cannot be loaded in the browser At the same time, the replacement text attribute tells the reader the information they are missing. At this point, the browser will display this alternative text instead of the image.<img src="//m.sbmmt.com/global/code/../style/images/pulpit.jpg" alt="Pulpit rock" width="300" height="200">
Tip: It is a good practice to specify the height and width of the image. If an image has a specified height and width, the specified dimensions will be retained when the page loads. If the size of the image is not specified, the overall layout of the HTML page may be destroyed when the page is loaded.Example
Add a background image:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>php中文网(php.cn)</title> </head> <body background="http://pic.58pic.com/58pic/15/97/99/27W58PICZS7_1024.jpg"> <h3>图像背景</h3> <p>gif 和 jpg 文件均可用作 HTML 背景。</p> <p>如果图像小于页面,图像会进行重复。</p> </body> </html>
Set the height and width of the image:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>php中文网(php.cn)</title> </head> <body > <img src="http://www.w3school.com.cn/i/eg_cute.gif" width="50" height="50"> <br /> <img src="http://www.w3school.com.cn/i/eg_cute.gif" width="100" height="100"> <br /> <img src="http://www.w3school.com.cn/i/eg_cute.gif" width="150" height="150"> </body> </html>
new file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>php中文网(php.cn)</title>
</head>
<body >
<p>创建图片链接:
<a href="//m.sbmmt.com">
<img src="http://www.runoob.com/try/demo_source/smiley.gif" alt="HTML 教程" width="32" height="32">
</a>
</p>
</body>
</html>
Preview
Clear
- Course Recommendations
- Courseware download
The courseware is not available for download at the moment. The staff is currently organizing it. Please pay more attention to this course in the future~
Students who have watched this course are also learning
Let's briefly talk about starting a business in PHP
Quick introduction to web front-end development
Large-scale practical Tianlongbabu development of Mini version MVC framework imitating the encyclopedia website of embarrassing things
Getting Started with PHP Practical Development: PHP Quick Creation [Small Business Forum]
Login verification and classic message board
Computer network knowledge collection
Quick Start Node.JS Full Version
The front-end course that understands you best: HTML5/CSS3/ES6/NPM/Vue/...[Original]
Write your own PHP MVC framework (40 chapters in depth/big details/must read for newbies to advance)
















