Home > Web Front-end > HTML Tutorial > [Front-end] How to use HTML

[Front-end] How to use HTML

高洛峰
Release: 2017-03-23 09:54:49
Original
1399 people have browsed it

编程语言:解释型和编译型

WEB前端:HTML+CSS+JavaScript

一、 HTML介绍:

---------------------------------------

1. 什么是HTML?

   超文本标记语言,  <标签名>--标记(标签、节点)

2. HTML是由:标签和内容构成

3. 程序语言有两种:解释性语言(HTML、PHP、Javascript)和编译型语言(C、C++、Java

4. HTML的标签组成部分、属性、实体

    HTML的实体: <:< >:>  空格:

5. HTML中注释

注释的目的:1. 辅助说明  2.代码调试

6. HTML标签(标记)的语法: 标签是由"<"和">"括起来

双标签:<标签名>....

单标签:<标签名/>

7. HTML中的颜色:可以是颜色单词:red/blue/green/yellow...

还可以是:#000000 --- #ffffff

            十六进制:0123456789abcdef

其中前两位表示红色,中间两位绿色,后两位表示蓝色。

二、 HTML中HEAD头部设置

----------------------------------------

设置网页编码:

    关键字:

    描述:  

    网页标题:本网页标题

    导入CSS文件:

    CSS代码:

    JS文件或代码:

    ... ...

三、 HTML中的文本标签、格式化标签

----------------------------------------

    文本标签:

1. *
换行

2. *

...

换段

3. ... 斜体

4. ... 强调斜体

5. ... 加粗

6. *... 强调加粗

7. *... 其中n为1--6的值。 标题标签(加粗、独立行)

8. 引用

  9. ...  ...

10.* 删除线 

....

    格式化标签:

1. *
换行

2. *

...

换段

    3. 列表:

                                                                                                                                                       Item

                                                                                                                                                                                                     

## 4.

4. *Hyperlinks in HTML A

-------------- ----------------------------------

* Hyperlink tag

Attribute: href is required, refers to the link jump address

target: indicates how the link is opened:

_blank New window

_parent parent window

_self This window (default)

_

top

Top-level window

framename Window name

title: text prompt attribute (details)

Anchor link:

Define an anchor point: Previously used < ;a name="a1">

Use anchor point: Jump to a1

5. *

Picture tag

img

-------------------------------- -------

Insert a picture into the webpage

Attributes: src: Picture name and url address

alt: Picture Prompt message when loading fails

title: Text prompt attribute

width

: Image width

height

: Image height

border: border line thickness

6. Multimedia tags (familiar)

--------------------- ---------------






7. *FormTag

-------------------------------- ------

*table table label

caption table title

*tr row label

*th column header label

*td Column label

It is related to the printer. Writing the header and footer before the table body will help to view the code

*thead Header

* tbody Table body

tfoot Table tail

8. **form form tag

------------------- ----------------------------------------

1.

--Form tag

Common attributes of form tag:

*actionAttribute: Submitted target address (URL)

* method attribute: submission method: get (default) and post

The get method is the URL address bar visible, the length is limited (IE2k Firefox 8k), relatively unsafe.

The post method is the URL address Invisible, unlimited length, relatively safe.

enctype: Submission type

target: Where to open the target URL.

name: The attribute gives the form a name. HTML5 is not supported. Use id instead.

2. The form item label input defines the input field where the user can enter data. In HTML 5, the type attribute has many new values.

Details are explained below:

For example:

3. tag;

*value attribute: drop-down item The value

*selected attribute: Default drop-down specified item.

4. *