html手写代码学习笔记

  • 格式:doc
  • 大小:90.50 KB
  • 文档页数:12

01-01.什么是HTML整个网页加载时最先执行的代码head,在英文里面是头部的意思。

在英文里面body是身体的意思。

整个网页的主体内容。

<html><head><style>21互联远程教育网</style></head><body></body></html>01-02.什么是属性举个例子,什么是属性。

一辆汽车每小时行驶多少公里这是它的属性,每公里耗油量也是它的属性。

一个本子长和宽是他的属性。

<html><head><style>21互联远程教育网</style></head><body bgcolor="#FF00aa" text="#000000">大家好,欢迎大家收看21互联远程教育网</body></html>Text:非链接文本颜色Bgcolor:背景颜色01-03.十六进制详解01-04.如何定义网页背景<html><head><style>21互联远程教育网</style></head><body bgcolor="#FF00aa" background="yangyan.jpg" text="#ffffff">大家好,欢迎大家收看21互联远程教育网</body></html>Background背景资料相对路径:图片如在你所编辑文件的上一层就用../表示,如在同一文件夹当中可先写出子文件夹名称再用/分开然后写图片名称,如果与你所编辑文件在同一文件夹当中可直接写出图片名称.图片名称需英文.绝对路径:例一辆车在某省某市某个区的停车库里面.01-05换行标签<br/><html><head><style>21互联远程教育网</style></head><body bgcolor="#FF00aa" background="yangyan.jpg" text="#ffffff">Hello world<br><br>大家好,欢迎大家收看21互联远程教育网</body></html><br>是空标记01-06.段落标签<p><html><style>21互联远程教育网</style></head><body bgcolor="#FF00aa" background="yangyan.jpg" text="#ffffff">Hello world<p>大家好,欢迎大家收看21互联远程教育网</p></body></html><html><head><style>21互联远程教育网</style></head><body bgcolor="#FF00aa" background="yangyan.jpg" text="#ffffff">Hello world<p align="center">大家好,欢迎大家收看21互联远程教育网</p></body></html><html><head><style>21互联远程教育网</style></head><body bgcolor="#FF00aa" background="yangyan.jpg" text="#ffffff">Hello world<p align="center"><b>大家好,欢迎大家收看21互联远程教育网</b></p></body></html><html><head><style>21互联远程教育网</style></head><body bgcolor="#FF00aa" background="yangyan.jpg" text="#ffffff">Hello world<p align="center"><b><i>大家好,欢迎大家收看21互联远程教育网</i></b></p></body></html><html><head><style>21互联远程教育网</style></head><body bgcolor="#FF00aa" background="yangyan.jpg" text="#ffffff">Hello world<p align="center"><b><i><u>大家好,欢迎大家收看21互联远程教育网</u></i></b></p> </body></html>align对齐center中心right 右边left 左边 b 粗体i斜体u下划线01-07.背景属性Bgproperties<html><head><style>21互联远程教育网</style></head><body bgcolor="#FF00aa" background="yangyan.jpg" text="#ffffff" bgproperties="fixed"> Hello world<p align="center"><b><i><u>大家好,欢迎大家收看21互联远程教育网</u></i></b></p> </body>bgproperties是控制body背景的一个属性,他的属性值为fixed的时候,它将把背景图像冻结在浏览窗口,背景图就不会随着其他窗口内容而滚动了。

但这个属性须跟background属性扩展一起使用时才有效。

如<body background="0.gif" bgproperties="fixed">fixed 固定的<html><head><style>21互联远程教育网</style></head><body bgcolor="#FF00aa" background="yangyan.jpg" text="#ffffff" bgproperties="fixed">Hello world<p align="center"><b><i><u>大家好,欢迎大家收看21互联远程教育网</u></i></b></p><hr size="7" width="50" align="center" noshade="noshade" color="#FF0000"></body></html>size 大小,尺寸<上下宽度> width 宽度<输入数字或百分比>没有阴影效果的水平线:<hr noshade="noshade">01-08.预定义格式标签<pre><html><head><style>21互联远程教育网</style></head><body bgcolor="#FF00aa" background="yangyan.jpg" text="#000000" bgproperties="fixed"><center>Hello world<strong><em>大家好,我们这套课程是介绍HTML的手写代码教程</em></strong></center><pre> 大家好,欢迎大家收看21互联远程教育网</pre></body></html>B和strong都可以让字体变成粗体,i和em和var和cite和dfn都可以让字体变成斜体。

address不仅可以让字体变成斜体,还可以和br一样有着换行的功能。

01-09.文字标签<big>、<small>、<strike><html><head><style>21互联远程教育网</style></head><body bgcolor="#FF00aa" background="yangyan.jpg" text="#000000" bgproperties="fixed"><center>Hello world<strong><big>大</big><small>大</small>家好,我们这套课程是介绍HTML的手写代码教程</strong></center><pre> <strike>大家好</strike>,欢迎大家收看21互联远程教育网</pre>A<sub>1</sub>6<sup>2</sup></body></html>Strike 删除线big 大s mall 小sub 下标字sup 上标字01-10.标题元素<h1>——<h5>及文字元素<font><html><head><style>21互联远程教育网</style></head><body bgcolor="#FF00aa" background="yangyan.jpg" text="#000000" bgproperties="fixed"> <center>Hello world<strong>大家好,我们这套课程是介绍HTML的手写代码教程</strong></center><pre> 大家好,欢迎大家收看21互联远程教育网</pre><h1>标题1</h1><h2>标题2</h2><h3>标题3</h3><h4>标题4</h4><h5>标题5</h5><h6>标题6</h6></body></html>font没讲01-11.有序列表<ol>一<html><head><style>21互联远程教育网</style></head><body bgcolor="#FF00aa" background="yangyan.jpg" text="#000000" bgproperties="fixed"> <ol type="I"><li>第一个项目</li><li>第二个项目</li><li>第三个项目</li><li>第四个项目</li><li>第五个项目</li><li>第六个项目</li></ol></body></html>ol称为有序清单标记Li表示有序清单中的各个项目01-12.有序列表<ol>二<html><head><style>21互联远程教育网</style></head><body bgcolor="#FF00aa" background="yangyan.jpg" text="#000000" bgproperties="fixed"> <ol type="1" start="3"><li>第一个项目</li><li>第二个项目</li><li>第三个项目</li><li>第四个项目</li><li>第五个项目</li><li>第六个项目</li></ol></body></html><html><head><style>21互联远程教育网</style></head><body bgcolor="#FF00aa" background="yangyan.jpg" text="#000000" bgproperties="fixed"> <ol start="2"><li type="a">第一个项目</li><li type="A">第二个项目</li><li>第三个项目</li><li>第四个项目</li><li>第五个项目</li><li>第六个项目</li></ol></body></html>01-13.有序列表<ol>三01-14.无序列表<ul>一<html><head><style>21互联远程教育网</style></head><body bgcolor="#FF00aa" background="yangyan.jpg" text="#000000" bgproperties="fixed"> <ol start="2"><li type="a">第一个项目</li><li type="A">第二个项目</li><li value="6">第三个项目</li><li>第四个项目</li><li>第五个项目</li><li>第六个项目</li></ol></body></html>Value设定当前项目从几开始<html><head><style>21互联远程教育网</style></head><body bgcolor="#FF00aa" background="yangyan.jpg" text="#000000" bgproperties="fixed"> <ul><li>第一个项目</li><li>第二个项目</li><li>第三个项目</li><li>第四个项目</li><li>第五个项目</li><li>第六个项目</li></ul></body></html>01-15.无序列表<ul>二<html><head><style>21互联远程教育网</style></head><body bgcolor="#FF00aa" background="yangyan.jpg" text="#000000" bgproperties="fixed"><ul type="circle"><li type="disc">第一个项目</li><li>第二个项目</li><li type="square">第三个项目</li><li type="1">第四个项目</li><li>第五个项目</li><li>第六个项目</li></ul></body></html>ul没有设置属性和设置为type=“disc”时各项目前面为实心圆,ul设置属性type=“square”时各项目前面为实心方块,ul设置属性type=“circle”时各项目前面为空心圆。