web前端开发技术学习打卡:DAY01

 

HTML基础

html文档由头部 head和主体body两个部分组成,

代码与页面效果展示:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <p>疯狂星期四</p>
    <h3>惊爆价</h3>
    <hr size=3 color="red">
    <a href="http://www.kfc.com.cn/kfccda/index.aspx">肯德基订餐</a>
    <script>
        document.write("请点击左侧");//向页面输入信息
    </script>
</body>
</html>

头部head

标题tltle

基本语法:
<title>标题信息显示在浏览器的标题栏</title>
tiitle标记应用
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>页面标题</title>
</head>
<body>
    页面标题在浏览器的标题栏上
</body>
</html>

元信息META标记 

meta标记用来描述一个html网页文档的属性

主体body

body标记

基本语法
<body>内容</body>

运用实例

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>学习网</title>
    <style type="text/css">
        p{text-indent: 2em;/*首行缩进两个字符*/}
    </style>
</head>
<body text="blue">
    <h3 align="center">学习秘诀</h3>
    <hr color="green">
    <p>每一个裂缝都是为透出光而努力</p>
</body>
</html>
body标记属性

设置bodys标记属性可以改变页面的显示效果

基本语法
<body text="#123" color="red">
应用实例
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>种植园林</title>
    <style>
        div{background: #99cccc;width: 500px;height: 150px;}
    </style>
</head>
<body background="red" bgcolor="green">
    <div id="" class="" >
        <p>欢迎访问网站,我们为您提供服务</p>
    </div>  
</body>
</html>

综合实例

以欢度中秋为题设计一个网页

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>欢度中秋</title>
    <style type="text/css">
        div{text-align: center;/*文本居中*/}
    </style>
</head>
<body bgcolor="skyblue">
    <h2 align="center">欢度中秋</h2>
    <hr size="12" color="blue" width="100%">
    <p align="left" >&nbsp;&nbsp;&nbsp;&nbsp;当月光倒入河心,星辰与思念对语,团圆有了深意。</p>
    <div id="" class="">
        <img src="tupian1.jpg" width="300" height="200">
        <img src="tupian2.jpg" width="300" height="200">
    </div>
    <hr size="10" color="green"width=100%>
    <p align="center">中秋快乐</p>  
</body>
</html>

希望这篇文章给大家能够带来帮助!

作者:茶不予

欢迎大家点赞与关注!

如有错误,请多多指正

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

茶不予

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值