【045】HTML初学
●·● 表格(Table):
星期一 | 星期二 | 星期三 | 星期四 | 星期五 | 星期六 | 星期日 | |
---|---|---|---|---|---|---|---|
第一节 | 数学 | 物理 | 数学 | 物理 | 数学 | ||
第二节 | 数学 | 理科综合
|
数学 | 物理 | 今天连上两节课
|
||
第三节 | 数学 | 物理 | 数学 | 物理 | 数学 | ||
第四节 | 数学 | 物理 | 数学 | 物理 | 数学 |
上面实现代码:

<table border="4" cellspacing="0" cellpadding="0" width="700" bgcolor="#FF9933" style="font-family:微软雅黑" background="http://img.blog.163.com/photo/OoY9IQpDIiARTzjN732F3Q==/2297117284936237964.jpg"> <caption style="font-size:x-large; font-weight: bold;">课程表</caption> <tr> <th width="100" height="30"> </th> <th width="100">星期一</th> <th width="120">星期二</th> <th width="100">星期三</th> <th width="100">星期四</th> <th width="200">星期五</th> <th width="100">星期六</th> <th width="100">星期日</th> </tr> <tr> <th align="center" height="25">第一节</th> <td align="center">数学</td> <td align="center">物理</td> <td align="center">数学</td> <td align="center">物理</td> <td align="center">数学</td> <td align="center" colspan="2" rowspan="4" style="font-size:xx-large; font-weight: bold" background="http://img.article.pchome.net/00/31/50/87/pic_lib/wm/1415470.jpg"> </td> </tr> <tr> <th align="center" height="60">第二节</th> <td align="center">数学</td> <td align="center"> 理科综合 <table border="1" width="100"> <tr> <td align="center">化学</td> <td align="center">物理</td> </tr> </table> </td> <td align="center">数学</td> <td align="center">物理</td> <td>今天连上两节课 <ol> <li>语文</li> <li>英语</li> </ol> </td> </tr> <tr> <th align="center" height="30">第三节</th> <td align="center">数学</td> <td align="center">物理</td> <td align="center">数学</td> <td align="center">物理</td> <td align="center">数学</td> </tr> <tr> <th align="center" height="25">第四节</th> <td align="center">数学</td> <td align="center">物理</td> <td align="center">数学</td> <td align="center">物理</td> <td align="center">数学</td> </tr> </table>
●·● 表单(Form):
<textarea rows="10" cols="30">写点东西吧...</textarea>
<fieldset> <legend>健康信息:</legend> <form> <label>身高:<input type="text" /></label> <label>体重:<input type="text" /></label> </form> </fieldset>
●·● optgroup:
上面的实现代码:
<html> <body> <select size="9"> <optgroup label="亚洲"> <option value="china">中国</option> <option value="japan">日本</option> </optgroup> <optgroup label="美洲"> <option value="america">美国</option> <option value="canada">加拿大</option> </optgroup> <optgroup label="欧洲"> <option value="england">英格兰</option> <option value="france">法国</option> </optgroup> </select> </body> </html>
●·● 标签选择器 & class选择器:
div-Class
实现代码如下
<head> <title></title> <style type="text/css"> a{font-family:Courier New;font-size:medium;color:Red;} .waring{background:Yellow;} </style> </head> <body> <a>Good Morning~~~~</a> <div class="waring">div-Class</div> <a href="http://www.baidu.com">Baidu</a> <br /> <a class="waring">a-Class</a> </body> </html>
●·● 调用CSS文件:
新建*.css文件
a:visited{text-decoration:none} a:active{text-decoration:none} a:link{text-decoration:none} a:hover{text-decoration:underline} 悬浮
调用上边的文件
<html> <head> <title></title> <link type="text/css" rel="Stylesheet" href="/font.css" /> <!--调用上面的文件--> </head> <body> <a href="http://www.baidu.com">Baidu</a> </body> </html>
●·● 定时刷新(meta):
效果:http://www.w3school.com.cn/tiy/t.asp?f=html_redirect
实现如下:
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <meta http-equiv="Refresh" content="5;url=http://www.w3school.com.cn"> </head> <body> </body> </html>
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· .NET10 - 预览版1新功能体验(一)