HTML5 new tags (online lesson notes, personal use)

1.video tag:Play video

Note: vedio is very similar to img, src is followed by the position of the video, where autoplay="autoplay" means autoplay, or directly add autoplay

<video src="SeanXiao.mp4" autoplay="autoplay">
</video>
* Attribute 1: controls, plus control bar

Insert picture description here

 <video src="SeanXiao.mp4" align="center" autoplay="autoplay" controls="controls">     
 </video>
* Attribute 2: poster—the picture displayed before the video is played

Insert picture description here
poster="Picture Location"

 <video src="SeanXiao.mp4" align="center" controls="controls" poster="007fzS16ly1gje86iv2jsj33qj23lhdy.jpg">     
 </video>
* Attribute 3: loop—whether the video needs to be played in a loop

Similar usage of autoplay

* Attribute 4: preload-preload video

Contradict with autoplay attribute

* Attribute 5: muted—video is muted, width and height are the same as img

2.audeo label:Play audio

Important attributes are the same as vedio, autoplay autoplay and controls

Insert picture description here

 <audio src="初见.mp3" autoplay controls>
 </audio>

3.details, summary tags:Summary details tab

Insert picture description here

<details>
        <summary>肖战</summary>
        2015年,被浙江卫视《燃烧吧少年!》节目组发掘成为选手;同年12月31日,作为燃烧吧少年团体成员之一亮相于浙江卫视“奔跑吧2016”跨年演唱会。2016年,主演校园星座超能力网络剧《超星星学园》并正式进入演艺圈。同年9月,以主唱担当的身份加入“X玖少年团”;之后,随X玖少年团推出同名数字专辑《X玖》。2017年,参演东方玄幻剧《斗破苍穹》;同年4月2日,随组合举行“以己之名”上海演唱会;之后,在古装言情传奇剧《狼殿下》饰演浪迹天涯的赏金猎人疾冲 。2018年,确认参演根据猫腻同名小说改编的古装权谋剧《庆余年》;4月,主演古装仙侠剧《陈情令》。2019年6月27日,主演的古装仙侠剧《陈情令》在腾讯视频播出,肖战凭魏无羡一角获得更多关注。8月,主演都市情感剧《余生,请多指教》。9月13日,主演的古装仙侠电影《诛仙I》在全国上映。11月10日,参加在上海举行的双十一晚会。
    </details>    

4. marquee tag:Summary details tab

<marquee direction="right" scrollamount="100">
        内容1
</marquee> 
<marquee scrollamount="10" loop="2" behavior="slide">
        内容2
</marquee>

dirction specifies the direction of scrolling, scrollamount="10" sets the scroll speed, loop specifies the number of scrolling, behavior="slide" sets the type of scrolling

<marquee>
<img src="007fzS16ly1gje5kxcp6aj32e936u1l3.jpg" width="100">
</marquee>

Note that everything in marquee can be scrolled!

5. Special label: Bold, underline, italic, strikethrough (not used in enterprise development)

---------->strong=b 、ins=u、em=i、del=s

Show:
Insert picture description here

    <b>SeanXiao</b>
    <u>SeanXiao</u>
    <i>SeanXiao</i>
    <s>SeanXiao</s>
    <!--改进版可以增添语义-->
    <strong>SeanXiao</strong>
    <ins>SeanXiao</ins>
    <em>SeanXiao</em>
    <del>SeanXiao</del>

6. Character entities (how to display spaces, carriage returns, tabs)

Space:   (a space)
how to display special symbols (> <): < less than > greater than
copyright symbol: ©

Insert picture description here

 &gt;<br>
 &lt;<br>
 &copy;<br>

7.Introduce CSS

Insert picture description here

 <!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>CSS开始学习</title>
    <style type="text/css">
        .one{
            font-weight: bold;
        }
        .two{
            text-decoration: underline;
        }
        .three{
            font-style: italic;
        }
        .four{
            text-decoration: line-through;
        }
    </style>
</head>

<body>
    <hr>
    <p class="one">SeanXiao</p>
    <p class="two">SeanXiao</p>
    <p class="three">SeanXiao</p>
    <p class="four">SeanXiao</p>
</body>
</html>

Guess you like

Origin blog.csdn.net/qq_43978754/article/details/109890432