img标签-HTML5精讲 课时ID:6.9 【表严肃】#HTML教程 #HTML5教程 #img标签

news/2025/2/23 18:22:44

6.9 <img>标签-HTML5精讲 课时ID:6.9 【表严肃】#HTML教程 #HTML5教程 #img标签


<img>用于定义网页中的图片

<html>
    <body>
        <img src="http://ww2.sinaimg.cn/mw690/006aIBkCjw1f8fchbk799g306807775k.gif">
    </body>
</html>

alt text

其中srcsource)是<img>标签的一个属性,用于指定图片的地址。

<img> 不允许存在结束标签,以下的写法是有误的:

        <img src="..."></img>

为什么?因为<img>不能存在子标签,所以无法作为容器存在,结束标签便没有意义了。
没有空间的杯子只是个玻璃块,盖子完全没有意义。

<img>支持的所有的常用图片格式: .gif.jpg.png.svg...

教程视频地址:
表严肃HTML5精讲 短小! 活好! 链接:biaoyansu.com/6.9

Tips:

  • 一张网页可有多个<img>标签

  • <img>标签没有结束标签

  • <img>不能存在子标签


http://www.niftyadmin.cn/n/2001454.html

相关文章

JDK8 Collectors 使用篇(四)

2019独角兽企业重金招聘Python工程师标准>>> #Collectors 使用 在之前篇章中&#xff0c;我们探讨了Lambdas、函数式接口编程、Stream的使用。现在拿collectors 耍耍. Collectors是一个reduce操作&#xff0c;通过collectors 可以把一个结合转换成另外一个集合colle…

搭建一个Tomcat,作为图片服务器,异步上传图片

1.图片服务器Tomcat的设置 tomcat/conf/web.xml中内容更改,将tomcat设置为可以读写<servlet><servlet-name>default</servlet-name> <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class><init-param><…

数据库sql优化经验总结

2019独角兽企业重金招聘Python工程师标准>>> 数据库sql优化经验总结 1.sql语句用索引&#xff0c;先聚集&#xff0c;后非聚集 sql语句查询中&#xff0c;能够使用聚集索引&#xff0c;就将聚集索引查询条件放最前面,然后是对应的非聚集索引 2.游标的用法 游标的快慢…

记一次失误造成的影响

在使用salt给机器添加时间同步的计划任务的时候&#xff0c;忘记salt的cron模块的写法了&#xff0c;于是偷懒直接使用echo追加到/var/spool/cron/root的方法添加了计划任务。如下&#xff1a;salt * cmd.run "echo */10 * * * /usr/sbin/ntpdate ntp1.aliyun.com > /d…

MR Technology Equipment Hololens Application Exhibition and Exchange

During the Microsoft Education Products Tour held in Nanjing on December 8, 2018, as a booth demonstrator, I demonstrated the application of MR technology equipment Hololens in the field of education for guests.

JavaSE_01概述

1. encoding [nkd] n. [计] 编码; v. [计] 编码encode的ing形式 2. applet [plt] n. 支程序小应用程序小型程式程序类型 3. algorithm [lgr()m] n. [计][数] 算法运算法则 4. application [plke()n] n. 应用申请应用程序敷用 5. assert [st] vt. 维护坚持断言主张声称 6. comma…

Filming of Microsoft China's Promotional Film The Application of Hololens in Education

On June 29, 2019, as the keynote speaker and main demonstrator, I participated in the filming of Microsoft China’s “Hololens in the field of education” promotional film. I demonstrated the characteristics of using Hololens for classroom teaching, record…

Run .NET Core on your platform

2019独角兽企业重金招聘Python工程师标准>>> 配置.Net可以运行于Mac os x或Linux等系统的方法 https://www.microsoft.com/net/core#macos 转载于:https://my.oschina.net/swingcoder/blog/757590