web开发1

<meta charset="utf-8"><!--防止乱码(语言一致)-->
<meta name="viewport" content="width=device-width,initial-scale=1.0"><!--这个是在不同设备上的控制网页大小-->
<meta name="keywords" content="你好世界,2024,C语言">
<meta name="description" content="《web开发试一试》">
<meta name="author" content="Error——Fe">
<meta http-equiv="refresh" content="5;https://blog.youkuaiyun.com/Error_Fe?type=blog">

html注释:<!--注释-->

css注释:/*注释*/

JavaScript注释:与C语言一致

与css配合达到一个简洁的效果

<link rel="stylesheet" href="style.css">
<link rel="stylesheet" media="print" href="print.css">
<link rel="stylesheet" media="screen and (min-width:512px) and (max-width:1024px)" href="screen.css">
<link rel="icon" type="image/x-icon" href="1234.icon">

以下是css的link

style.css

body{
	background-image:url("preview.jpg")
	}
h1 {color:red;
	text-align:center;
	}
p {color:yellow}
a {
color:green;
background:pink;
}

print.css

h1{
	color:black;
	}
img{
	color:black;
	}
a{
	color:black;
	}
p{
	color:black;
	}

screen.css  适应网页尺寸,换背景图片

body{
	background-image:url("123.jpg")
	}

完整的html 

<!DCTYPE html>
<html>
<head>
	<title>第一个程序</title>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width,initial-scale=1.0">
	<meta name="keywords" content="你好世界,2024,C语言">
	<meta name="description" content="《web开发试一试》">
	<meta name="author" content="Error——Fe">
	<!-- -->
	<link rel="stylesheet" href="style.css">
	<link rel="stylesheet" media="print" href="print.css">
	<link rel="stylesheet" media="screen and (min-width:512px) and (max-width:1024px)" href="screen.css">
	<link rel="icon" type="image/x-icon" href="1234.icon">
</head>
<body>
		<h1>Hello world</h1>
		<img alt="bg" src="bg.png" width="30%" height="30%">
		<a href="https://blog.youkuaiyun.com/Error_Fe?type=blog" target="_blank">优快云个人用户,快来关注我!!!</a>
		<p>I love C program!</p>
</body>
</html>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值