[2016-01-14] [HTML] [img Tag]

Source: Internet
Author: User

[2016-01-14] [HTML] [img Tag]
  
 
12345678910111213141516171819202122232425262728293031 <html>    <head>        <title>img标记</title>        <meta charset = "utf-8">    </head>    <body>        <pre>img标记,单标记!!!        img标记的属性:            src指定图片的路径                ../img.jpg 表示上级目录下的img.jpg图片                    (两个点表示上一级目录,一个点表示当前目录)                img/123.jpg 表示当前目录的img文件夹下的 123.jpg文件                12345.jpg 表示当前目录下12345.jpg文件    后面的属性没反应!!!!!!          width属性 指定图片的宽度,(如果height属性没指定,图片按比例放缩)            单位可以是 px,em,cm,mm 比如 ,100px            也可以是百分比 比如,10% 百分比指的是显示框的百分比                heigth属性,同width                border属性 指定图片边框的宽度,单位同上                alt属性:1.指定图片加载完成之后,鼠标移动到图片上显示的文字                2.如果图像没有下载或者加载失败,会用文字代替图像                3.搜索引擎可以通过这个文字来抓取图片        </pre>        <img src = "http://img002.21cnimg.com/photos/album/20160114/m600/7F3CCC3F4FE4E0484EBA54F274F7B761.jpeg" ,border = "30px">        <img src = "http://img002.21cnimg.com/photos/album/20160114/m600/7F3CCC3F4FE4E0484EBA54F274F7B761.jpeg" ,alt="alt属性",width = "500px">        <img src = "img/1.jpg" ,alt="alt属性",width = "50%">    </body></html>



IMG tag, single MARK!!! Properties of the IMG tag: src Specifies the path of the picture. /img.jpg represents the img.jpg image under the parent directory (two dots for the previous directory, one point for the current directory) img/123.jpg represents the 123.jpg file under the IMG folder of the current directory 12345.jpg Indicates that the property behind the 12345.jpg file in the current directory does not respond!!!!!! The Width property specifies how wide the picture is, (if the Height property is not specified, the picture is scaled proportionally) the unit can be px,em,cm,mm for example, 100px can also be a percentage for example, a percentage of 10% refers to the percentage of the Display box Heigth property, The same Widthborder property specifies the width of the picture border, in the same unit as the ALT attribute: 1. Specifies that after the picture is loaded, the mouse moves to the text displayed on the picture 2. If the image does not download or fails to load, the text will replace the image 3. Search engines can use this text to grab pictures


From for notes (Wiz)

[2016-01-14] [HTML] [img Tag]

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.