1. Basic knowledge
1. Chinese Questions
For the problem of Chinese garbled characters,
you can set the encoding method on the browser to GB2312
or add the encoding settings at the top of the html
If GB2312 does not work, use UTF-8
2. Labels
HTML is the abbreviation of Hyper Text Markup Language.
HTML is composed of a set of markup tags, usually called tags.
Tags are composed of start tags and end tags.
<p> This is a start tag
</p> is an end tag
The text between the <p> Hello World </p> tags is called the content
3. Elements
Element refers to all the code from the start tag to the end tag
such as
<p>HelloWord</p>
4. Properties
Attributes are used to modify labels,
such as setting a title to be centered
The align="center" written in the start tag is called the attribute
align is the attribute name center is the attribute value
Attribute values should be enclosed in double quotes
5. Notes
html is commented with <!-- -->
2. Basic elements
1. Title
Titles are automatically bolded, capitalized, and wrapped
Generally, <h1> to <h5> are used to represent headings of different sizes.
2. Paragraph
<p> tag means paragraph
It is the abbreviation of paragraph with aline break effect
3. Bold
<b>
<strong>
Can be used to achieve bold effect
4. Italics
Both <i> and <em> can indicate italic effect
5. Line breaks<
br
/>
6. Preformat<
pre
>实现在网页中显示代码的效果。
7.删除效果
<del>即删除标签
8.下划线
<ins>即下划线标签
9.图像
参见:http://how2j.cn/k/html/html-image/185.html
10.超链
<a href="跳转到的页面地址">超链显示文本</a>
See more: http://how2j.cn/k/html/html-a/186.html
11. Forms
See http://how2j.cn/k/html/html-table/187.html
12. List
List is divided into unordered list and ordered list
Represented by <ul> tags and <ol> tags, respectively
13. Block div span
Difference between div and span
Div is a block element, that is, the
common block elements that automatically wrap, and h1, table, p
span are inline elements, that is, they will not wrap
Common inline elements are img, a, b, strong
14. Fonts
See: http://how2j.cn/k/html/html-font/644.html
15. Inline frames
<iframe> is an inline frame
"Insert" a web page in a web page through an iframe
三、表单元素 详见:http://how2j.cn/k/html/html-text/191.html
1.文本框
<input type="text"> 即表示文本框
并且只能够输入一行
如果要输入多行
使用文本域<textarea>
注: <input> 标签很特别,一般是不需要写成<input />或者<input></input> 这样的。
并且<input> 这样的写法也是满足标准的
2.密码框
<input type="password"> 即表示密码框
3.表单
<form>用于向服务器提交数据,比如账号密码
4.单选框
<input type="radio" > 表示单选框
5.复选框
<input type="checkbox"> 即表示复选框
6.下拉列表
<select> 即下拉列表
需要配合<option>使用
7.文本域
<textarea> 即文本域
与文本框不同的是,文本域可以有多行,并且可以有滚动条
8.各种按钮