编程笔记

编程笔记

用html5制作自己的课程表
2025-01-29

用html5制作自己的课程表
当我们每个学期开始上课时,是不是总要登入一些网站或app才能找到自己的课程表呢?这里,我给大家展示怎样自己写属于自己的课程表,能够创建一个网页,并随时打开自己的课程表岂不美哉!
首先,创建.txt文档,然后变更后缀名名为.html,即可创建一个空网页!(若电脑无法显示后缀名,请百度收索“电脑文件名后缀显示问题”)
然后,将下面的代码复制输入,改为自己的课程名称即可:

<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8">
		<title>My schedule</title>
	</head>
	<style>
		body{
   
			background:#f9f9f9;
			color: #000000;
			font-size: 16px;
			font-family: 微软雅黑;
		}
	</style>
	<body>
		<table border="2" width="80%" align="center" bgcolor="#FFF0FF" cellpadding="7" cellspacing="7">
			<caption style="font-size: 30px;">课程表</caption>
			<tr>
				<th style="font-size: 16px;">星期</th>
				<th colspan="2" style="font-size: 20px;"><b>星期天</b></th>
				<th colspan="2" style="font-size: 20px;"><b>星期一</b></th>
				<th colspan="2" style="font-size: 20px;"><b>星期二</b></th>
				<th colspan="2" style="font-size: 20px;"><b>星期三</b></th>
				<th colspan="2" style="font-size: 20px;"