Blogger Information
Blog 24
fans 0
comment 0
visits 18492
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
html基础知识,网页组成,html设计思想,语法结构,元素属性值,网页中的实体字符,文件与文件夹,URL
昔年
Original
954 people have browsed it

hmtl 基础

1.网页的组成

任何一个页面都有三部分

序号 内容 描述
1 文本内容 用户可见的内容,如新闻,电话
2 其他资源的引用 图片,视频,音频…
3 标记 对文本,其他资源的描述
  1. <p>我是PHP中文网的讲师,朱老师</p>
  2. <img src="logo.png" alt"log>

2.html 设计思想

  • 超文本:是指包括了超链接的文本
  • 预定义标记:是用来描述内容的固定标签
  • 语言:html 并不是编程语言

3.html 语法结构

  1. <!DOCTYPE html>
  2. <!-- 通知浏览器,我是一个html文档 -->
  3. <html lang="en">
  4. <!-- html:根标签/根元素 -->
  5. <head>
  6. <!-- head中的内容,用户不感兴趣,或者不需要用户看到,给浏览器/开发者 -->
  7. <!-- 元数据:描述某种特点信息的数据 -->
  8. <!-- 当前字符集uft-8 -->
  9. <meta charset="UTF-8" />
  10. <!-- viewport:视口/可视区屏幕 -->
  11. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  12. <title>当前页面的标题</title>
  13. </head>
  14. <body>
  15. <!-- 这是用户真正看到的内容啦 -->
  16. <h2>PHP中文网欢迎大伙...</h2>
  17. </body>
  18. </html>

4.元素,属性和值

4.1 元素与标签

元素 标签 描述
非空元素 双标签 ‘<p>学习让我很快了</p>‘
空元素 单标签 ‘<img src="1.jpg">‘

4.2 属性和值

  • 属性写在标签当中
  • 值:预定义值,字符串,指定格式,布尔值,数值
  • 布尔:只要元素中出现这个属性,就是代表它 true,如果不需要他,就不要写
  • 几乎所有元素都可以设置的三大通用属性:’id’,’class’,’style’

5.网页中的实体字符

  • 空白的处理:空格,制表符,换行符,无论写多少个都算一个

6.文件与文件夹

  • 全部使用小写
  • ‘.html’,’.html’
  • 文件名:’hellow-world.php’

/. URL

7.1 语法

  • URL:统一资源定位符,互联网的任何一个文件/资源都必须要有一个唯一的访问地址
  • URL:

<!-- https://www.php.cn/course/379.html -->

  • http/https:协议,模式
  • www.phph.cn:域名/主机名
  • course/379.html:访问的资料在服务器上的真是路径
    ![](https://img.php.cn/upload/image/794/471/739/1585901015563413.png)
Correcting teacher:天蓬老师天蓬老师

Correction status:qualified

Teacher's comments:## 与文本之间应该有空格, 有空把markdown语法再看看
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!