作者: littleboy
2023-08-05 19:54:01
html基础知识

基础知识
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
| --- layout: false --- <!DOCTYPE html> <html> <head> <title>网站标题</title> <base> <link rel="stylesheet" type="text/css" href="mystyle.css"><!外部样式�? <link rel="shortcut icon" href="页面ico图标文件路径"> <meta charset="utf-8"> <script></script> <style type="text/css"> h1 {background-color:yellow;} p1 {color:blue;}</style><!内部样式�? </head>
<body> <h1>h1标题标签</h1><!h1~6> <hr> <div><!块级元素 <p>段落标签 <br>分段标签</br> <b>加粗文本</b><br> <i>斜体文本</i><br> <code>电脑自动输出</code><br> <sub> 下标</sub> <sup> 上标</sup><br> <a href="https://www.runoob.com">链接标签</a><br> <a href="#">链接标签</a><br> <a href="#跳转id">Contacts</a> <h2 id="跳转id">Contacts</h2> <img src="Assert\图片路径.png" width="258" height="39"alt="无法加载提示"> <map><!定义图像地图></map> <area><!定义图像地图的可点击区域> </p> </div> <table border="1" cellpadding="10" cellspacing="0"> <caption>table name</caption> <tr> <td>1,1</td> <td>1,2</td> <th colspan="2">单元格跨两列</th> </tr> <tr> <th rowspan="2">单元格跨两行</th> <td>2,1</td> <td>2,2</td> <td>2,3</td> </tr> <tr> <td>3,1</td> <td>3,2</td> <td>3,3</td> </tr> </table> <ul> <li>Coffee</li> <li>Tea</li> <li>Milk</li> </ul> <ol> <li>Coffee</li> <li>Tea</li> <li>Milk</li> </ol> <p><hr> <h3>笔记</h3> 属性(有参考文件):单双引号括起, 属性和属性值对大小写不敏感�?X)HTML 要求使用小写属�?br> <a href="//www.runoob.com/html/html-formatting.html">标签�?/a><br> CSS:内联样式(属性)、内部样式表(head里的style)、外部引用(CSS文件�?br> <a href="//www.runoob.com/html/html-entities.html">特殊字符输入参考:</a><br> CSS被用来同时控制多重网页的样式和布局�?br> JavaScript 可以让你的网页更加生动。与用户进行交换或者让网页更加生动�?br> </p>
</body> </html>
|
布局
#演示
CSS
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
| <!DOCTYPE html> <html> <head> <title>网站标题</title> <base> <link rel="stylesheet" type="text/css" href="mystyle.css"> <link rel="shortcut icon" href="页面ico图标文件路径"> <meta charset="utf-8"> <script></script> <style type="text/css"> h1 {background-color:yellow;} p1 {color:blue;}</style> </head> <body>
<h2 style="color: red;">CatPhotoApp</h2> <style>h3{font-size: 30px;color: red;}</style> <h3>CatPhotoApp</h3> <style>.imagestyle{width: 500px;}</style> <img class="imagestyle" src="截图/css 使用媒体查询改变变量.png" alt="无法加载"> <style>#cat-photo-app {background-color: green;}</style> <h2 id="cat-photo-app">cat-photo-app<h2> <style>[type='checkbox'] {margin: 20px 0px 20px 0px;}</style> <label><input type="checkbox" name="personality" checked> Loving</label> <h2 class="class1 class2"> <style>.thin-red-border { border-color: red; border-width: 5px; border-style: solid; border-radius:10px; border-radius:50%; } </style> <style>.penguin {--penguin-skin:gray;}</style> <style>属性名: var(--penguin-skin,备用值);</style> <style>:root {--penguin-belly: pink;}</style> </body> </html>
<style>.red-text {color: red;p {font-size: 16px;}}</style>
<style>h2{font-family: Helvetica, sans-serif;}</style>
|
应用视觉设计
#演示
应用可访问性
#演示
javascript网页跳转
菜鸟教程在线编辑器
#演示
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>菜鸟教程(runoob.com)</title> <script> function displayDate() { document.getElementById("demo").innerHTML=Date(); } </script> </head> <body>
<h1>我的第一个 JavaScript 程序</h1> <p id="demo">这是一个段落</p>
<button type="button" onclick="displayDate()">显示日期</button>
</body> </html>
|
显示你的IP地址
IP地址