Detailed explanation of table tags in html

迷茫
Release: 2017-03-25 11:31:46
Original
1714 people have browsed it

Statement1: The text here is copied from my own csdn account. It is the crystallization of my own learning and summary, so please respect this work. 2: If you want to reprint this article, you must indicate the source of the text. 3: If there is anything wrong, please point it out.

In the previous article, I mainly talked about some basic tags of http, such as link tags, image tags, html frames, etc. Then the next step will focus on table tags and list tags. , a detailed explanation of form tags

1: Table tags

##
Table tags


    table标签 

我的好朋友

姓名 性别 年龄 爱好
小红 20 跳舞
小舵 24 唱歌
Copy after login

Note:##The label is used to represent the line

The label is used to represent the column

The label is used to represent the title of the table, usage and The same, but the content inside will be automatically enlarged and bolded

border using using through together using using using using out off out out out out off out through out out out through out out out out out out through - t's Set the height of the table, the unit is pixel

cellspacing Set the distance between cells, which refers to the spacing of the table border

cellpadding Set the distance between the text and the cell border

bgcolor Set the background color of the table

align Used to set the alignment, such as center, left, right

The header nameis used to represent the header

(2) About merging cells

   table中合并单元格 
1 占两列 2
占两行 3 4 5
6 7 8
Copy after login


Note

: When you enter different content in each cell of the table, your content will change with different lengths. If you want each cell to maintain There are two ways to make the same size: 1; For example, when the total height of your table is 400 and you set 4 rows, then add attributes to eachtag: hight=100; which is equivalent to even distribution, and use the same width for the same width. method. 2: It will be simpler than the first one, which is to set the css style and fix the size of tr and td

2: List tag

   列表标签 
2017年心愿
  • 父母身体健康
  • 宝宝健康成长
  • 媳妇健健康康
2017年大事件
  1. 老婆要生小孩了
  2. 自己换工作了
  3. 要卖掉一套房
时刻告诉自己
不抱怨
零负能量
该与不该
Copy after login
The running results are as follows:


3: Form

< form>Form tag##

  form表单 
用户注册 用户名:

密码 :

性别:男性 女性

学历:

兴趣爱好:骑车 睡觉 吃饭 敲代码
备注:

个人头像:
个人网站:
个人邮箱:
身体体重:
出生日期:
详细时间:
隐藏项:
47
Copy after login
The rendering is as follows:

##

The above is the detailed content of Detailed explanation of table tags in html. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source: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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!