html5-4 HTML5超链接、URL地址和表格

news/2024/7/8 11:27:43

html5-4 HTML5超链接、URL地址和表格

一、总结

一句话总结:

 

1、cellspace有什么用?

清除表格的单元格间距

26     <table border='1px' cellspacing='0px' width='100%'>

 

2、页面中的字体一般用什么好,怎么设置?

微软雅黑,在通用选择器里面选择

 7         *{
 8             font-family: 微软雅黑;  9 }

 

3、如何设置表格中的元素横向居中?

给行tr设置横向居中,text-align:center

16         tr{
17             text-align:center; 18  height:50px; 19 }

 

二、HTML5超链接、URL地址和表格

1、相关知识

超链接:
<a href='http://www.baidu.com' target='_blank'>百度</a>

图片超链接:
<a href='http://www.baidu.com'>
    <img src='jin.png'>
</a>

url网址:
http://www.baidu.com/index.php?id=10
http http协议
www.baidu.com 域名
index.php 脚本文件
id=10     脚本参数

表格:
<table width='100%' border='1px' cellspacing='0px'>
    <tr>
        <th>adlf</th>
        <th>adlf</th>
        <th>adlf</th>
    </tr>
    <tr>
        <td>aa</td>
        <td>aa</td>
        <td>aa</td>
    </tr>
</table>

 

2、代码

table表格

 1 <!doctype html>
 2 <html lang="en">
 3 <head>
 4     <meta charset="UTF-8">
 5     <title>index</title>
 6     <style>
 7         *{
 8             font-family: 微软雅黑;
 9         }
10         caption{
11             font-size:30px;
12             font-weight:bold;
13             color:#999
14         }
15 
16         tr{
17             text-align:center;
18             height:50px;
19         }
20         table,td,th{
21             border-color:#0f0;
22         }
23     </style>
24 </head>
25 <body>
26     <table border='1px' cellspacing='0px' width='100%'>
27         <caption>用户表</caption>
28         <tr>
29             <th>编号</th>
30             <th>用户名</th>
31             <th>密码</th>
32         </tr>
33         <tr>
34             <td colspan='3'>123</td>
35         </tr>
36         <tr>
37             <td rowspan='4'>1</td>
38             <td>user1</td>
39             <td>123</td>
40         </tr>
41         <tr>
42             <td>user1</td>
43             <td>123</td>
44         </tr>
45         <tr>
46             <td>user1</td>
47             <td>123</td>
48         </tr>
49         <tr>
50             <td>user1</td>
51             <td>123</td>
52         </tr>
53     </table>
54 </body>
55 </html>

 

 

 

 

 

 

 

 

转载于:https://www.cnblogs.com/Renyi-Fan/p/9207758.html


http://www.niftyadmin.cn/n/4388297.html

相关文章

两行代码激活windows系统

slmgr /skms kms.03k.org slmgr /ato 将以上代码存为bat文件运行

python使用time库创建时间路径和时间文件

import time import osclass FilePath(object):def __init__(self):# 获得当前系统时间的字符串self.local_time time.strftime("%Y-%m-%d-%H-%M-%S", time.localtime(time.time()))print(self.local_time)print(type(self.local_time))# 获取年字符串self.year se…

java mongodb 查询 游标_MongoDB 游标详解及实例代码

MongoDB 游标详解MongoDB中的游标与关系型数据库中的游标在功能上大同小异。游标相当于C语言的指针&#xff0c;可以定位到某条记录&#xff0c;在MongoDB中&#xff0c;则是文档。因此在mongoDB中游标也有定义&#xff0c;声明&#xff0c; 打开&#xff0c;读取&#xff0c;关…

python web自动化测试之二次封装 selenium 类

from logs.logger import Logger from selenium.common.exceptions import NoSuchElementException import time import os from selenium import webdriver """""" """二次封装 selenium 类,又称之为通用类。用于给页面类使用 &…

java程序员昵称_那些神秘的Java程序员

我们都知道程序员的工作主要就是写代码&#xff0c;这样的工作可能会给他们带来近视、秃顶等种种问题。而之前我看过一档辩论型的综艺节目&#xff0c;从中了解到&#xff0c;在北京&#xff0c;女孩们的家长最希望自己未来的女婿是个程序员。这是为什么呢&#xff1f;原来她们…

vue 中 mixins 的详细介绍

mixins(混入)就是定义了一部分公共的方法、计算属性或者钩子函数等 vue 组件中的可复用功能&#xff0c;然后混合进各个组件中使用。下面我们具体来看看怎么使用。 创建一个 demo.js 文件&#xff0c;然后 export 给外部使用 export const demoMixins {data() {return {name: …

python+selenium webui自动化测试之打开浏览器封装两种方式ini配置文件或者yaml文件

yaml文件&#xff1a;# !/usr/bin/python # -*- coding:utf-8 -*-from logs.logger import Logger from selenium import webdriver import os from configfg.read_yaml import YamlReader import timelogger Logger(logger"BrowserEngine").get_log()# 浏览器引擎类…

uni-app 微信小程序实现发送给朋友分享功能

我们在用 uni-app 开发微信小程序时&#xff0c;我们有时需要分享功能&#xff0c;uni-app 中只要在需要分享的页面的 js 中定义了 onShareAppMessage(和 onLoad 等生命周期函数同级)&#xff0c;就能实现 发送给朋友 微信小程序的分享功能。但是如果每个需要分享的页面都写一个…