html 表格套表格_HTML表格

html 表格套表格

A table is a set of rows and columns, which could be created on a webpage in HTML, by <table> tag. The tabular representation of complex data makes it readable.

表格是一组行和列,可以通过<table>标签在HTML网页上创建。 复杂数据的表格表示使其易于阅读。

The <table> tag if followed by another tag <th> which specifies the table heading, the <tr> tag defines the table row and the <td> tag holds the table data.

如果<table>标记后跟另一个标记<th> ,该标记指定表标题,则<tr>标记定义表行,而<td>标记保存表数据。

The below code is a sample code to create a table in HTML.

以下代码是在HTML中创建表的示例代码。

<html>
<body>
<table>
<tr>
<th>Name</th>
<th>Age</th>
<th>City</th>
</tr>
<tr>
<td>Shivang</td>
<td>21</td>
<td>Indore</td>
</tr>		
<tr>
<td>Amit</td>
<td>22</td>
<td>Gwalior</td>
</tr>
</table>	
</body>
</html>

Output

输出量

Table tag in HTML

Additionally, a table name could be assigned to the table by the <caption> element. The <caption> tag is to be inserted immediately after the <table> tag. Although the use of the caption element is completely optional for the table.

此外,可以通过<caption>元素将表名分配给表。 <caption>标记将立即插入<table>标记之后。 尽管对于表,标题元素的使用完全是可选的。

<html>
<body>
<table border>
<caption>Student Record</caption>
<tr>
<th>Name</th>
<th>Age</th>
<th>City</th>
</tr>
<tr>
<td>Shivang</td>
<td>21</td>
<td>Indore</td>
</tr>		
<tr>
<td>Amit</td>
<td>22</td>
<td>Gwalior</td>
</tr>
</table>	
</body>
</html>

Output

输出量

Table tag in HTML

The <table> tag has attributes which can alter the table representation. The border of the table, the alignment of the content of data in the table is some of them.

<table>标记具有可以更改表表示形式的属性。 表的边界,表中数据内容的对齐就是其中一些。

<table>标签的共同属性 (Common attributes of <table> tag)

align: The align attribute specifies the alignment of the table. The values which could be given to the align attribute are left, right or center.

align :align属性指定表的对齐方式。 可以给align属性指定的值是left,right或center。

<table align="right">

border: By default, the <table> tag applies no border to the table. Thus the border attribute is used to specify the width of the table border. This width could be given in either pixel or percentage.

border :默认情况下,<table>标记不对表应用边框。 因此,border属性用于指定表格边框的宽度。 该宽度可以像素或百分比形式给出。

<table border="10px">

bordercolor: This attribute is used to provide a color to the border. The name or the hex code of the color is provided to this attribute to apply color to the border.

bordercolor :此属性用于为边框提供颜色。 颜色的名称或十六进制代码提供给此属性,以将颜色应用于边框。

<table bordercolor="#0000ff">

width: The width attribute specifies the table width. The value of this attribute is similar to the border as could be given in pixels or percentage form.

width :width属性指定表格的宽度。 此属性的值类似于边框,可以以像素或百分比形式给出。

<table width="100%">

bgcolor: This attribute is used to apply color to the table. The name of the color or the hex-code is to be mentioned to this property. A hex-code of the color is the color code which is defined by the combination in the RGB system.

bgcolor :此属性用于将颜色应用于表格。 颜色或十六进制代码的名称要在此属性中提及。 颜色的十六进制代码是由RGB系统中的组合定义的颜色代码。

<table bgcolor="#000066">

An example with attributes

具有属性的示例

<html>
<body>
<table border="2px" width="80%" bordercolor="#006969" bgcolor="yellow" align="center">
<caption>Student Record</caption>
<tr>
<th>Name</th>
<th>Age</th>
<th>City</th>
</tr>
<tr>
<td>Shivang</td>
<td>21</td>
<td>Indore</td>
</tr>		
<tr>
<td>Amit</td>
<td>22</td>
<td>Gwalior</td>
</tr>
</table>	
</body>
</html>

Output

输出量

Table tag in HTML

The CSS files also could be used for styling the table and adding more design and layouts to the table and providing the responsiveness to the table simultaneously.

CSS文件还可以用于对表格进行样式设置,为表格添加更多设计和布局以及同时提供对表格的响应能力。

Some commonly used CSS properties of a table are,

表格的一些常用CSS属性是,

  • border

    边境

  • border-collapse

    边界崩溃

  • padding

    填充

  • text-align

    文字对齐

Example of table with CSS

带有CSS的表格示例

<html>
<body>
<style>
table {
border: solid 2px black; 
border-collapse: collapse;
padding: 10px;
text-align : center;
}
</style>
<table width="80%" bordercolor="#006969" bgcolor="yellow">
<caption>Student Record</caption>
<tr>
<th>Name</th>
<th>Age</th>
<th>City</th>
</tr>
<tr>
<td>Shivang</td>
<td>21</td>
<td>Indore</td>
</tr>		
<tr>
<td>Amit</td>
<td>22</td>
<td>Gwalior</td>
</tr>
</table>	
</body>
</html>

Output

输出量

Table tag in HTML

翻译自: https://www.includehelp.com/html/html-tables.aspx

html 表格套表格

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/377011.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Android判断界面

仿造微信&#xff0c;第一次进入去引导界面&#xff0c;否则进启动界面。 package edu.hpu.init;import edu.hpu.logic.R;import android.app.Activity;import android.content.Intent;import android.content.SharedPreferences;import android.os.Bundle;import android.os.H…

HDU计算机网络系统2021复习提纲

目录计算机网络系统的主要功能TCP/IP模型与OSI模型的层次结构及各层功能。&#xff08;掌握&#xff09;TCP/IP参考模型各层次所对应的主要设备局域网的体系结构与IEEE.802标准数据链路层的编址方式和主要设备原理数据链路层CSMA/CD的技术原理交换机VLAN原理与划分方法数据链路…

ruby 线程id_Ruby中的线程

ruby 线程idRuby线程 (Ruby Threads) In Ruby, with the help of threads, you can implement more than one process at the same time or it can be said that Thread supports concurrent programming model. Apart from the main thread, you can create your thread with …

Dynamic web project --- AspectJ Project

本来想今天晚上 直接转到 以前的web项目 做测试。。。可惜在eclipse 添加 aspectj的时候 提示我不是 aspectj项目。。于是我就百度了好久&#xff0c;发现好多人都和我一样 &#xff0c; 不过我也发现了一些可以的 比如右键 AJDTtools --> convert to Aspectj Project ,可惜…

2013 南京邀请赛 A play the dice 求概率

1 /**2 大意&#xff1a;给定一个色子&#xff0c;有n个面&#xff0c;每一个面上有一个数字&#xff0c;在其中的m个面上有特殊的颜色&#xff0c;当掷出的色子出现这m个颜色之一时&#xff0c;可以再掷一次。。求其最后的期望3 思路&#xff1a;假设 期望为ans4 ans 1/…

掷骰子

Description: 描述&#xff1a; In this article, we are going to see a dynamic programing problem which can be featured in any interview rounds. 在本文中&#xff0c;我们将看到一个动态的编程问题&#xff0c;该问题可以在任何采访回合中体现。 Problem statement:…

《YOLO算法笔记》(草稿)

检测算法回顾 5、6年前的检测算法大体如下&#xff1a; 手动涉及特征时应该考虑的因素&#xff1a; 1、尺度不变性 2、光照不变性 3、旋转不变性 这一步骤称为特征工程&#xff0c;最重要的一个算法称为sift&#xff0c;(回顾SIFT讲解)体现了上述所有的观点。 在分类的过程中…

U盘安装Centos6.3

一 首先下载Centos6.3的光盘镜像文件&#xff0c;网上到镜像实在是太多了。 CentOS-6.3-i386-bin-DVD1.iso CentOS-6.3-i386-bin-DVD2.iso 二 下载个新版本的UltraISO, 在其菜单“启动”下有“写入硬盘镜像“功能到&#xff0c;原来用到绿色版本是8.6.2.2011不支持&#xff0c;…

[转]粵語固有辭彙與漢語北方話辭彙對照

本文转自&#xff1a;http://beta.wikiversity.org/wiki/%E7%B2%B5%E8%AA%9E%E5%9B%BA%E6%9C%89%E8%BE%AD%E5%BD%99%E8%88%87%E6%BC%A2%E8%AA%9E%E5%8C%97%E6%96%B9%E8%A9%B1%E8%BE%AD%E5%BD%99%E5%B0%8D%E7%85%A7 粵語固有辭彙與漢語北方話辭彙對照 「粵語」&#xff08;或稱「…

openlayer调用geoserver发布的地图实现地图的基本功能

转自&#xff1a;http://starting.iteye.com/blog/1039809 主要实现的功能有放大&#xff0c;缩小&#xff0c;获取地图大小&#xff0c;平移&#xff0c;线路测量&#xff0c;面积测量&#xff0c;拉宽功能&#xff0c;显示标注&#xff0c;移除标注&#xff0c;画多边形获取经…

LLVM与Codegen技术

LLVM 百度百科 LLVM是构架编译器(compiler)的框架系统&#xff0c;以C编写而成&#xff0c;用于优化以任意程序语言编写的程序的编译时间(compile-time)、链接时间(link-time)、运行时间(run-time)以及空闲时间(idle-time)&#xff0c;对开发者保持开放&#xff0c;并兼容已有…

跟乌克兰人学编程1

今天要Disable一个菜单&#xff0c;工程项目多&#xff0c;不容易找。 乌克兰人建议我用Spy&#xff0c;将靶拖到目标窗体上就可以看到类名。转载于:https://www.cnblogs.com/SunWentao/archive/2012/12/19/2825220.html

html网页转图片_HTML图片

html网页转图片HTML图片 (HTML Images) Images are visuals of something that look elegant. In web pages, images are used to create a good and appealing design. 图像是外观精美的视觉效果。 在网页中&#xff0c;图像用于创建良好且吸引人的设计。 The <img> ta…

Android学习拾遗

1. java中的flush()作用&#xff1a;强制将输出流缓冲区的数据送出。 2. 文件存储&#xff1a; 存储到内部&#xff1a;另外使用一个class实现&#xff0c;最开始初始化用了this,后来放在这里不合适&#xff0c;改成了带参数的构造方法。 包括存储、读取、追加 读取&#xff1a…

OLAP 技术之列式存储与数据压缩(快查询方法之一)

前言 列式存储和数据压缩&#xff0c;对于一款高性能数据库来说是必不可少的特性。一个非常流行的观点认为&#xff0c;如果你想让查询变得更快&#xff0c;最简单且有效的方法是减少数据扫描范围和数据传输时的大小&#xff0c;而列式存储和数据压缩就可以帮助我们实现上述两…

sql 视图嵌套视图_SQL视图

sql 视图嵌套视图SQL | 观看次数 (SQL | Views) Views in SQL are virtual tables. A view also has rows and columns as theyre during a real table within the database. We will create a view by selecting fields from one or more tables present within the database.…

Postgresql多线程hashjoin(inner join)

pg hashjoin 节点大致步骤&#xff1a; 1、分块与分桶。对一个表hash时&#xff0c;确定块数和桶数量。&#xff08;一块被划分为10个元组的桶&#xff09;确定分块号与分桶号是由hashvalue决定的。 2、执行&#xff1a; 1、顺序获取S表中所有元组&#xff0c;对每一条元组Has…

iframe实现局部刷新和回调--开篇

今天做项目遇到一个问题。就是提交表单的时候&#xff0c;验证用户名是否存在和验证码是否正确。 当验证码或者用户名存在的时候。在后台弹窗提示。可页面原本file里面符合要求的值刷新没了。用户体验不好。因为用ifream刷新技术已不是什么新鲜技术。所以网上有大把的资料可参考…

Java文件类boolean setExecutable(boolean exec_file,boolean owner_access)方法,带示例

文件类boolean setExecutable(boolean exec_file&#xff0c;boolean owner_access) (File Class boolean setExecutable(boolean exec_file , boolean owner_access)) This method is available in package java.io.File.setExecutable(boolean exec_file , boolean owner_acc…

OLTP 系统和 OLAP 系统的核心设计思想

关于 OLTP 系统和 OLAP 系统的核心设计思想 数据存储系统的关于查询的典型操作&#xff1a; -- 第一种需求&#xff1a; 根据 key&#xff08;1&#xff09; 找 value&#xff08;name,age&#xff09;&#xff0c; 单点查询 select name, age from student where id 1; stu…