html configuration and text, media, hyperlink tags

Basic configuration of Html

<!--告诉浏览器,后面的代码都是HTML的-->
<!DOCTYPE html>
<!--跟路径 网页的整体-->
<html lang="en">
<!--头标签 网页的头部-->
<head>
    <!--对网页来进行设置,各种设置-->
    <meta charset="UTF-8">
    <!--网页的标题-->
    <title>我的第一个网页</title>
</head>
<!--身体标签-->
<body>
    <b>网页的主体内容</b>
    <strong>网页的主体部分</strong>
</body>
</html>

text

<h>Labels (Title Tags) 6 levels from high to low<h1>到<h6>

Bold <b></b> <strong></strong>(stronger semantics)

Slant <i></i> <em></em>(more semantically strong) "emphasize" –> emphasis

Strikethrough <s></s> <del></del>(stronger semantics)

Underscore <u></u> <ins></ins>(stronger semantics) "inserted"–>insert

<br>wrap <hr>horizontal line

media audio video

controls-controls (cannot be displayed normally without)

autoplay - autoplay

loop - loop playback

<body>
    <audio src="" controls autoplay loop></audio>
</body>

Insert picture img

<img src="图片的路径" alt="图片加载失败会显示这行字" title="鼠标悬停在图片上时显示的文字"
     width="" height="">

Hyperlink <a href=""><a>

​ text-decoration: none; cancel the underline

​ download The URL downloaded by the browser (only applicable to same-origin URLs)

<style>
    a:href{
      
      
        
    }
</style>
<body>
    <!--target="_blank"新窗口跳转-->
    <a href="#" target="_blank"></a>
    <!-- target="_self" 当前窗口跳转 -->
    <a href="#" target="_self"></a>
    <!-- href="" 中间为空时默认刷新当前网页  会刷新!!!-->
    <a href=""></a>
    <!-- href="#" 中间是#时会回到页面顶部 不会刷新页面!! -->
    <a href="#"></a>
</body>

Guess you like

Origin blog.csdn.net/weixin_52682014/article/details/127644496