【html】|Essential for the front end|Basic grammar|Simple application|General speaking|Continuous update....

1. Discussion and thinking of html

HTML can only be regarded as a simple text compilation tool in essence. It is not any kind of programming language. It is like a blog MD editor . It is a text language. Through some operations, text, links, and pictures can be edited , video and other editing operations, html only plays a role in modifying the text, just like notepad with the function of modifying text, of course, this function is undoubtedly a relatively simple operation, because we are completing There is no doubt that some data storage must be completed during these operations . These complex modifications will appear very complicated when they appear together with the data , so we need other tools to complete the more exquisite modification of the web page, that is, jS, css .

At the same time, the best way to learn html language is to write a webpage by hand, slowly carve out the website, and then try to build the website bit by bit. Having said so much, we can follow the ideas of the following notes to complete the study of html

Wait a minute, in the learning of html, we can also consider it as a language composed of header files and tags, learn according to this way of thinking, and finally integrate it.

Second, the basic grammatical structure

1. Overall structure

<!DOCTYPE html>  
<html>

<head>  </head>[//头文件部分]

<body>  </body>[//主体部分]


</html>[//文件主体]

2. Label thinking

1. Label: function

Type: Single, Double

2. Nature: The property representation is generally || property = property 1, 2, 3;

3. Content

Three, head tag

meta tags

single tag

1,1 name nature

secondary properties

1. How to use:

<meta name ="参数" content = "具体的参数值" >

2, General parameters:

<!--1.keywords 关键字,使用英文逗号分割-->
<meta name = "keywords" content = "关键字">

<!--2.description 网站的主要内容-->
<meta name = "description" content = "网站的主要内容">

<!--3.robots "搜索引擎向导//固定语句" -->
<meta name="robots"content="none"> 

<!--4.author 作者名称 -->
<meta name = "author" content = "S_zhi">


3, Supplementary parameters
robots Fixed parameter Supplement
all: files will be retrieved, and links on the page can be queried;
none: files will not be retrieved, and links on the page cannot be queried;
index: files will be retrieved;
follow : Links on the page can be queried;
noindex: files will not be queried, but links on the page can be queried;
nofollow: files will be queried, but links on the page cannot be queried

The name tag is not common Supplement
E, generator

<meta name="generator"content="信息参数"/> 

The information parameters of the generator in the meta tag represent the software used to make the website.

F、COPYRIGHT

<META NAME="COPYRIGHT"CONTENT="信息参数"> 

The COPYRIGHT information parameter of the meta tag represents the copyright information of the website.

G、revisit-after

<META name="revisit-after"CONTENT="7days"> 

revisit-after stands for website revisit, 7days stands for 7 days, and so on.

1,2 charset properties

Common use: for related encoding operations

<meta charset="utf-8">
1,3 http-equiv properties

secondary properties

1. Common use

<meta http-equiv = "参数" ,content = "相关参数"

2. Common parameters

<!-- X-UA-Compatible 浏览器的最大兼容性-->

 <meta http-equiv="X-UA-Compatible" content="IE=edge">

<!--              Refresh  所指向的新页面 
[//(注意后面的引号,分别在秒数的前面和网址的后面)]
		注意:其中的2是指停留2秒钟后自动刷新到URL网址。-->

<meta http-equiv="Refresh"content="2;URL=http://www.haorooms.com"> 
<!--这个操作还是比较实用的 ,来写加载页面看起来还行--> 

3, uncommon parameters
A, Expires (period)

Description: It can be used to set the expiration time of the web page. Once a web page expires, it must be retransmitted to the server. Note: The time format of GMT must be used.

<meta http-equiv="expires"content="Fri,12Jan200118:18:18GMT"> 

B. Pragma (cache mode)

Description: Prohibits the browser from accessing page content from the local computer's cache. Note: With this setting, visitors will not be able to browse offline.

<meta http-equiv="Pragma"content="no-cache"> 

D. Set-Cookie (cookie setting)

Note: If the web page expires, the saved cookie will be deleted. Note: The time format of GMT must be used.

<meta http-equiv="Set-Cookie"content="cookie value=xxx;expires=Friday,12-Jan-200118:18:18GMT;path=/"> 

E, Window-target (display window settings)

Description: Force the page to be displayed as an independent page in the current window. Note: It is used to prevent others from calling their own pages in the frame.

<meta http-equiv="Window-target"content="_top"> 

title label // double label

Use: the content is the content displayed by the webpage label

<title>  网页标签显示的内容 </title>

Fourth, the body tag

1. Document Features

=formatting marks=

Note that the leading spaces in the format tags will not appear. First, we accept the types of tags. The nature of these tags is basically the same, so we learn them together.

1, title
<h1~6>    标题内容 </hx>
标题大小从小到大

insert image description here

2. Dividing line

single tag

<hr>

insert image description here

3, Enter
<br>
4, paragraph
<p></p>
段落标签,写主要的文本内容
5. list
 <ul align="left" >
        代办任务
        <li>cf完成100道题目</li>
        <li>cf完成 1000 分</li>
    </ul>
<!--ul 是有序列表  , ol 是无序列表  , li 是列表里面的每个的值-->
    <ol>
        获得成就
        <li>小试牛刀 —— cf 解决10个问题</li>
        <li>大显身手 —— cf 达到 700 分</li>
    </ol>
6, uncommonly used paragraphs
<dl> <!--最大的段落表示 -->

<dt><!--每个点的头 --> 

<dd> <!--段落--> 

Common Properties in Formatting Markup

1, color: color="color"
2, address: align="address"
3,


Timeline 7/20

Guess you like

Origin blog.csdn.net/wen030803/article/details/131827782