search
HomeWeb Front-endHTML TutorialXHTML introductory learning tutorial: Application of table tags_HTML/Xhtml_Web page production


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.
Statement
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
Why are HTML attributes important for web development?Why are HTML attributes important for web development?May 12, 2025 am 12:01 AM

HTMLattributesarecrucialinwebdevelopmentforcontrollingbehavior,appearance,andfunctionality.Theyenhanceinteractivity,accessibility,andSEO.Forexample,thesrcattributeintagsimpactsSEO,whileonclickintagsaddsinteractivity.Touseattributeseffectively:1)Usese

What is the purpose of the alt attribute? Why is it important?What is the purpose of the alt attribute? Why is it important?May 11, 2025 am 12:01 AM

The alt attribute is an important part of the tag in HTML and is used to provide alternative text for images. 1. When the image cannot be loaded, the text in the alt attribute will be displayed to improve the user experience. 2. Screen readers use the alt attribute to help visually impaired users understand the content of the picture. 3. Search engines index text in the alt attribute to improve the SEO ranking of web pages.

HTML, CSS, and JavaScript: Examples and Practical ApplicationsHTML, CSS, and JavaScript: Examples and Practical ApplicationsMay 09, 2025 am 12:01 AM

The roles of HTML, CSS and JavaScript in web development are: 1. HTML is used to build web page structure; 2. CSS is used to beautify the appearance of web pages; 3. JavaScript is used to achieve dynamic interaction. Through tags, styles and scripts, these three together build the core functions of modern web pages.

How do you set the lang attribute on the  tag? Why is this important?How do you set the lang attribute on the tag? Why is this important?May 08, 2025 am 12:03 AM

Setting the lang attributes of a tag is a key step in optimizing web accessibility and SEO. 1) Set the lang attribute in the tag, such as. 2) In multilingual content, set lang attributes for different language parts, such as. 3) Use language codes that comply with ISO639-1 standards, such as "en", "fr", "zh", etc. Correctly setting the lang attribute can improve the accessibility of web pages and search engine rankings.

What is the purpose of HTML attributes?What is the purpose of HTML attributes?May 07, 2025 am 12:01 AM

HTMLattributesareessentialforenhancingwebelements'functionalityandappearance.Theyaddinformationtodefinebehavior,appearance,andinteraction,makingwebsitesinteractive,responsive,andvisuallyappealing.Attributeslikesrc,href,class,type,anddisabledtransform

How do you create a list in HTML?How do you create a list in HTML?May 06, 2025 am 12:01 AM

TocreatealistinHTML,useforunorderedlistsandfororderedlists:1)Forunorderedlists,wrapitemsinanduseforeachitem,renderingasabulletedlist.2)Fororderedlists,useandfornumberedlists,customizablewiththetypeattributefordifferentnumberingstyles.

HTML in Action: Examples of Website StructureHTML in Action: Examples of Website StructureMay 05, 2025 am 12:03 AM

HTML is used to build websites with clear structure. 1) Use tags such as, and define the website structure. 2) Examples show the structure of blogs and e-commerce websites. 3) Avoid common mistakes such as incorrect label nesting. 4) Optimize performance by reducing HTTP requests and using semantic tags.

How do you insert an image into an HTML page?How do you insert an image into an HTML page?May 04, 2025 am 12:02 AM

ToinsertanimageintoanHTMLpage,usethetagwithsrcandaltattributes.1)UsealttextforaccessibilityandSEO.2)Implementsrcsetforresponsiveimages.3)Applylazyloadingwithloading="lazy"tooptimizeperformance.4)OptimizeimagesusingtoolslikeImageOptimtoreduc

See all articles

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 Article

Hot Tools

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment