You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<head><metacharset="utf-8"><title>My test page</title></head>
title和h1的区别:
h1 会加载显示在页面中
title 是用来表示整个html文档大致内容的元数据
元数据 <meta>
在 head 中可以出现任意多个 meta 标签。一般的 meta 标签由 name 和 content 两个属 性来定义。name 表示元信息的名,content 则用于表示元信息的值。
元数据就是描述数据的数据,而HTML有一个“官方的”方式来为一个文档添加元数据—— 元素。
charset 指定了文档的字符编码 <meta charset="utf-8">
name 指定了meta 元素的类型; 说明该元素包含了什么类型的信息。<meta name="author" content="Chris Mills">
content 指定了实际的元数据内容。
description也被使用在搜索引擎显示的结果页中
<metaname="description" content="The Mozilla Developer Network (MDN) providesinformation about Open Web technologies including HTML, CSS, and APIs for bothWeb sites and HTML5 Apps. It also documents Mozilla products, like Firefox OS.">
主要包含了页面是元数据
title和h1的区别:
元数据
<meta>
在 head 中可以出现任意多个 meta 标签。一般的 meta 标签由 name 和 content 两个属 性来定义。name 表示元信息的名,content 则用于表示元信息的值。
元数据就是描述数据的数据,而HTML有一个“官方的”方式来为一个文档添加元数据—— 元素。
<meta charset="utf-8">
<meta name="author" content="Chris Mills">
利用meta标签对viewport进行控制
一个典型的针对移动端优化的站点包含类似下面的内容:
viewport主要有以下属性
自定义图标
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
添加css和JavaScript
<link rel="stylesheet" href="my-css-file.css">
<script src="my-js-file.js"></script>
其他meta
The text was updated successfully, but these errors were encountered: