Home Web Front-end HTML Tutorial HTML basic notes (recommended)

HTML basic notes (recommended)

Dec 21, 2016 pm 04:07 PM
html

一,网页基础结构:

<html>  
    <head>  
                <title>我的第一个网页</title>  
    </head>  
    <body>  
                这是我的第一个网页   
    </body>  
</html>
Copy after login

注意:在HTML中,标签大部分都是成对出现的。有开始就有结束

如果不是成对出现的标签,在标签的后面加上/表示结束。

二、基本标签

1、h1-h6 标题标签
2、em 斜体
3、strong 粗体
4、hr 切割线
5、br 换行
6、p 段落标签
7、 特殊符号,空格
8、> 特殊符号,>
9、< 特殊符号,<
10、" 特殊符号,"
11、© 特殊符号,版权符号
12、注释
13、img 图片标签

属性:src:图片的路径,alt:当图片找不到时,显示的文字
title:鼠标悬浮显示的文字
用法:
...

14、a 超链接标签
属性:href:链接到哪里去
用法:
链接
锚链接
先在一个位置写上
然后另一个位置写上
点击这个链接,会找到这个?所在的位置

用法:
链接到这了来
从这了链接

15、ul-li 无序列表
用法:


  • 列表项1

  • .......
  • 列表项n

注意:没有顺序,每一个li就是一行
默认情况下,每一个li前面都有一个实心小点

16、ol-li 有序列表 
用法:


  1. 列表项1

  2. .......
  3. 列表项n


就是将无序列表的实心小点换成了序号

17、dl-dt-dd定义列表
用法:


标题1

内容1

标题2

内容2

实现效果:
标题1
内容1
标题2
内容2

18、表单元素
a、text 单行文本框 
b、password 密码框
c、radio 单选按钮
d、file 文件选择器
e、checkbox 复选框
f、select 下拉列表
g、submit 提交按钮
h、reset 重置按钮
i、textarea 文本域

用法:

j、form标签 提交标签
语法:


如果action为空,则表示提交到当前页面
method可选属性:post、get
post安全性高,提交的信息不会显示在地址栏
get安全性较低,提交的信息显示在地址栏
如果不写method属性,默认是get

k、input标签 可选值:就是表单元素a-i

l、select 下拉列表

用法:

m、 关联表单

作用:点击名字这两个字,鼠标会聚焦在名字后面的文本框中

三、注意:
1、标签名应该小写
2、HTML标签应闭合(结束)
3、标签应正确嵌套

四、表单属性
1、readonly="readonly" 只读
2、disabled="disabled" 禁用

五、表格
1、什么是表格?
最简单的就是队列,表格之间,可以写东西

2、表格怎么使用?
先画一个大框,再画每一行,再画每一列


















3、数据或者说是元素都可以放在td里面

4. Some attributes of the table:
width: set the width
border: the thickness of the border
align: alignment, the most common, center, horizontal alignment
valign: alignment, the most common, center, vertical alignment
cellspacing= "20": The distance between the grid and the grid, the default value is 0
cellpadding="20": The distance between the content and the grid, the default value is also 0
bgcolor: Change the background color

5. Merge:
colspan= "2": Merge cells, merge horizontally
rowspan="2": Merge cells, merge vertically

The above is the content of HTML basic notes (recommended). For more related content, please pay attention to the PHP Chinese website (www.php .cn)!


Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Table Border in HTML Table Border in HTML Sep 04, 2024 pm 04:49 PM

Guide to Table Border in HTML. Here we discuss multiple ways for defining table-border with examples of the Table Border in HTML.

Nested Table in HTML Nested Table in HTML Sep 04, 2024 pm 04:49 PM

This is a guide to Nested Table in HTML. Here we discuss how to create a table within the table along with the respective examples.

HTML margin-left HTML margin-left Sep 04, 2024 pm 04:48 PM

Guide to HTML margin-left. Here we discuss a brief overview on HTML margin-left and its Examples along with its Code Implementation.

HTML Table Layout HTML Table Layout Sep 04, 2024 pm 04:54 PM

Guide to HTML Table Layout. Here we discuss the Values of HTML Table Layout along with the examples and outputs n detail.

HTML Input Placeholder HTML Input Placeholder Sep 04, 2024 pm 04:54 PM

Guide to HTML Input Placeholder. Here we discuss the Examples of HTML Input Placeholder along with the codes and outputs.

HTML Ordered List HTML Ordered List Sep 04, 2024 pm 04:43 PM

Guide to the HTML Ordered List. Here we also discuss introduction of HTML Ordered list and types along with their example respectively

Moving Text in HTML Moving Text in HTML Sep 04, 2024 pm 04:45 PM

Guide to Moving Text in HTML. Here we discuss an introduction, how marquee tag work with syntax and examples to implement.

HTML onclick Button HTML onclick Button Sep 04, 2024 pm 04:49 PM

Guide to HTML onclick Button. Here we discuss their introduction, working, examples and onclick Event in various events respectively.

See all articles