Getting started with web design

1. HTML document basic format
When using Dreamweaver to create a new default document, it will bring some source code, such as:

1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml"


3<head>
4<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
5<title>无标题文档</title>
6</head>

7<body>
8</body>
9</html>

The included source code constitutes the basic format of the html file. It
mainly includes:
<! DOCTYPE> Document type declaration
<html> Root tag
<head> Head tag
<body> Body tag

2. HTML tags
(1) single tags and double tags

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>


<body>
<h2>传智播客网页平面设计免费公开课<h2>
<p>更新时间。。。。。。</p>
<hr />
<p>传智播客网页设计平面公开课。。。。。。</p>
</body>
</html>

The above uses different tags to define the network than the title tag <h2>, horizontal tag <hr />, paragraph tag <p>
double tag: also known as the body tag, refers to the tag composed of the start and end tags .
Basic syntax
<tagname> content <tagname>
single tag: also known as empty tag, refers to a tag that can be completed with a tag symbol to describe a function
Basic syntax
<tagname />
(2) Comment tag

Here is the quote

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>


<body>
<!--这是一段注释。注释不会再浏览器中显示.-->
<p>这是一段普通的段落</p>
</body>
</html>

3. The attribute of the tag The
syntax format is as follows:
<tagname attribute 1 = “attribute 1” attribute 2 = “attribute 2” ……> content </ tagname>
Any tag attribute has a default value, and the default is omitted if the attribute is omitted value. E.g:

<h1 align="center" >标题文本<h1>

4. Related tags in the head of the HTML document
* 1 <meta name = “name” content = “value” />

< meta name="keyword" content="java培训,net培训 />

* 2 <meta http-equiv = “name” content = “value” />

Reference external file tag <link>
Insert picture description here
5. HTML text control tag
Title tag

<hn aling="对齐方式">标题文本</hn>

Paragraph mark

<p aling="对齐方式">段落文本</p>

Horizontal mark

<hr 属性="属性值"/>

<hr /> Mark common attributes
Insert picture description here

6. Text style mark
Insert picture description here
7. Text formatting mark
Insert picture description here
8. Special character mark
Insert picture description here

Published 28 original articles · Like1 · Visits1711

Guess you like

Origin blog.csdn.net/qq_45870494/article/details/103332595