html中插入css和js

插入css:

HTML周明华添加css样式的方法有很多种,常见的有一下几种:、

1、直接标签后添加如:

<html>
<div style="background:red;"></div>
</html>

2、直接在同一文档如:

<html>
<style type="text/css">
div{ red;}
</style>
<div></div>
</html>

3、最常见,实际开发中用的是外联样式表,即把css样式单独写以文件中,HTML中引用该文件即可如:

<html>
<head>
<link rel="stylesheet" type="text/css" href="xx.css">
</head>
</html>
插入js:
<script language="JavaScript">
<!--
中间是JS代码
//-->
</script>
原文地址:https://www.cnblogs.com/chenluomenggongzi/p/5277104.html