XHTML introductory learning tutorial: Application of table tags_HTML/Xhtml_Web page production

WBOY
Release: 2016-05-16 16:44:42
Original
1468 people have browsed it

Table is an embarrassing tag in XHTML. This section is just about understanding it. About the form
Before CSS became popular, tables were widely used for positioning. In XHTML, tables are not recommended for positioning. W3C hopes that CSS can replace 在定位方面的地位。不过事实上由于利用CSS布局常常需要大量的手写代码工作(常用的网页设计软件如Dreamweaver并不能完美支持div的显示),
仍被许多网站用语首页布局,例如Google的More products页面就利用了table来定位。 不过我个人推荐您开始使用CSS来定位网页,因为这是Web发展的方向。当然了,在初期用CSS取代table可能使您遇上很多的麻烦。 表格标签

在XHTML中,创建表格的标签是
,书写代码时,我们要先用标签将表格分成一行一行,再用. When writing code, we must first use the tag to divide the table into rows and rows, and then use the
标签把每行分成一格一格。完全手写代码创建table是十分困难和低效的,而在网页制作软件中制作表格就如同Word一样简单,只需要选择行列之类的简单属性即可。但是我们可能会遇到自动做出的表格不符合要求,而需要在代码模式调整的可能,因此我们还是要大概了解XHTML表格标签的具体写法。 表格的边框(border)属性
标签可以有border属性。如果不设置border属性的值,在默认情况下,浏览器将不显示表格的边框。 表格练习
我们来建立一个四行两列的标签,代码如下:

















一个格子 一个格子
一个格子 一个格子
一个格子 一个格子
一个格子 一个格子
in positioning. However, in fact, since using CSS layout often requires a lot of handwritten code work (commonly used web design software such as Dreamweaver does not perfectly support the display of divs), is still used by many websites as homepage layout, such as Google's More products page. table to locate. However, I personally recommend that you start using CSS to position web pages, because this is the direction of the development of the Web. Of course, replacing tables with CSS may cause you to run into a lot of trouble in the early days. Table tag
In XHTML, the tag to create a table is
tag to divide each row into cells. It is very difficult and inefficient to create a table with completely handwritten code. However, creating a table in web page production software is as easy as Word, and you only need to select simple attributes such as rows and columns. However, we may encounter the possibility that the automatically generated table does not meet the requirements and needs to be adjusted in the code mode. Therefore, we still need to have a general understanding of the specific writing method of XHTML table tags. The border attribute of the table

tags can have border attributes. If you do not set the value of the border attribute, the browser will not display the table border by default. Table practice Let’s create a label with four rows and two columns. The code is as follows:
A gridA gridOne gridOne gridOne gridA gridA gridA grid td>
The display result of is as follows: Pay attention to the above code. There are 4 pairs of in total, corresponding to the 4 lines below. And each (row) has two cells. So it becomes a table with 4 rows and 2 columns. a grid a grid a grid a grid a grid a grid a grid a grid Such a table is sufficient for listing information such as data, but tables used for positioning are usually more complex. Again, we do not recommend using tables for positioning, so we only briefly introduce here.
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
Popular Tutorials
More>
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!