HTML 提供了多种选项来表示结构化和非结构化数据。它允许我们在段落、有序列表、无序列表、表格等中呈现数据。在本主题中,我们将学习 HTML tr 标签。
创建 HTML 表格,在表格标签
中显示的数据单元格。 … | 标签(如果它是标准数据单元格或在中) … | 如果它是标题单元格,则标记。
---|
… | …. |
---|
让我们回顾一下下面的例子:
示例:
<title>This is a table example</title> <style> th, td { padding : 10px; border : 1px solid #666; } </style>
Sr. No. | Popular programming languages | Description |
---|---|---|
1 | Java | Java has been holding position 1 or 2 for the world’s most popular languages since it’s inception. It was created in mid 90s and since then many large and small companies have adopted it for developing desktop and web applications |
2 | C | C is a popular language for cars, sensors and embedded systems. It has been one of the top most popular languages mainly due to its universal compatibility |
3 | Python | Python is very popular in today’s era specially since it support quick development of application based on machine learning, big data and AI. |
如您所见,我们使用 上面的示例在浏览器中查看时为我们提供了以下输出: 为了进一步自定义 使用align属性,我们可以自定义 但是,HTML 5 不支持此属性。 我们可以使用 style 标签中的 background 属性来设置行的背景。让我们看一下下面的示例。 代码: 上述代码在浏览器窗口中的输出如下,其中第一行的背景颜色已更改为绿色: 我们可以通过使用 tr 标签中的 color 属性来操作箭头中文本的颜色。让我们将其中一行的字体颜色更改为灰色。 代码: 上述代码在浏览器窗口中的输出如下所示,我们可以发现应用于表格第一行的字体颜色: 如上所示,我们可以使用 HTML 表和 tr 元素来定义和表示结构化数据。我们可以自定义同一个表中的不同行来更改行的样式。我们还可以使用 th 和 td 来定义表头和标准表数据。我们可以进一步自定义一行的字体颜色、字体大小、字体家族、字体装饰和背景颜色。 中表示的数据相比,它们具有粗体外观。标签,具有标准外观。
HTML tr 标签的属性
中呈现的数据;元素,我们可以在
中使用以下属性:标签:
1.对齐
中的文本对齐方式。标签。它可以使用以下值。
2.背景
<title>This is a table example</title>
<style>
th, td {
padding : 10px;
border : 1px solid #666;
}
</style>
Sr. No.
Popular programming languages
Description
// here we are setting the back ground color to #00ff3787
1
Java
Java has been holding position 1 or 2 for the world’s most popular languages since it’s inception. It was created in mid 90s and since then many large and small companies have adopted it for developing desktop and web applications
2
C
C is a popular language for cars, sensors and embedded systems. It has been one of the top most popular languages mainly due to its universal compatibility
3
Python
Python is very popular in today’s era specially since it support quick development of application based on machine learning, big data and AI.
3.颜色
<title>This is an example of HTML table</title>
<style>
th, td {
padding : 10px;
border : 1px solid #666;
}
</style>
Sr. No.
Popular programming languages in 2019
Description
// here we are setting the font color to grey
1
Java
Java has been holding position 1 or 2 for the world’s most popular languages since it’s inception. It was created in mid 90s and since then many large and small companies have adopted it for developing desktop and web applications
2
C
C is a popular language for cars, sensors and embedded systems. It has been one of the top most popular languages mainly due to its universal compatibility
3
Python
Python is very popular in today’s era specially since it support quick development of application based on machine learning, big data and AI.
结论
以上是HTML 标签的详细内容。更多信息请关注PHP中文网其他相关文章!

文章解释说,HTML标签是用于定义元素的语法标记,而元素是完整的单位,包括标签和内容。他们一起工作以构建网页。查拉克计数:159

本文讨论了Lt; Head&gt; &&lt;身体&gt; HTML中的标签,它们对用户体验的影响以及SEO的影响。正确的结构增强了网站功能和搜索引擎优化。

本文讨论了HTML标签,和和关注其语义与表现用途及其对SEO和可访问性的影响之间的差异。

文章讨论了在HTML中指定字符,重点介绍了UTF-8。主要问题:确保正确显示文本,防止乱七八糟的字符,并增强SEO和可访问性。

本文讨论了用于构建和造型Web内容的各种HTML格式标签,强调了它们对文本外观的影响以及语义标签对可访问性和SEO的重要性。

本文讨论了HTML的“ ID”和“类”属性之间的差异,重点是它们的独特性,目的,CSS语法和特异性。它解释了它们的使用如何影响网页样式和功能,并为

文章讨论了html列表类型:订购(&lt; ol&gt;),无序(&lt; ul&gt;)和描述(&lt; dl&gt;)。专注于创建和样式列表以增强网站设计。


热AI工具

Undresser.AI Undress
人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover
用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool
免费脱衣服图片

Clothoff.io
AI脱衣机

Video Face Swap
使用我们完全免费的人工智能换脸工具轻松在任何视频中换脸!

热门文章

热工具

Dreamweaver CS6
视觉化网页开发工具

WebStorm Mac版
好用的JavaScript开发工具

Atom编辑器mac版下载
最流行的的开源编辑器

VSCode Windows 64位 下载
微软推出的免费、功能强大的一款IDE编辑器

DVWA
Damn Vulnerable Web App (DVWA) 是一个PHP/MySQL的Web应用程序,非常容易受到攻击。它的主要目标是成为安全专业人员在合法环境中测试自己的技能和工具的辅助工具,帮助Web开发人员更好地理解保护Web应用程序的过程,并帮助教师/学生在课堂环境中教授/学习Web应用程序安全。DVWA的目标是通过简单直接的界面练习一些最常见的Web漏洞,难度各不相同。请注意,该软件中