html基础学习总结

来源:互联网 发布:2016宏观经济数据分析 编辑:程序博客网 时间:2024/04/30 07:13

HTML Basic Document

<html><head><title>Document name goes here</title></head><body>Visible text goes here</body></html>

Text Elements

<p>This is a paragraph</p><br> (line break)换行<hr> (horizontal rule)分割线<pre>This text is preformatted</pre>格式不变

Logical Styles

<em>This text is emphasized</em><strong>This text is strong</strong><code>This is some computer code</code>

Physical Styles

<b>This text is bold</b><i>This text is italic</i>斜体

Links, Anchors, and Image Elements

<a href="http://www.example.com/">This is a Link</a><a href="http://www.example.com/"><img src="URL"alt="Alternate Text"></a><a href="mailto:webmaster@example.com">Send e-mail</a>A named anchor:
<a name="tips">Useful Tips Section</a><a href="#tips">Jump to the Useful Tips Section</a>

Unordered list

<ul><li>First item</li><li>Next item</li></ul>  ul属性type中有circle,square,disc(缺省)可以选择

Ordered list(与 ul 的区别?)ol每项前面是数字,ul每项前面是点

<ol><li>First item</li><li>Next item</li></ol> ol属性type中有A,a,I,i可以选择(前两种为字母,后两种为罗马数字,缺省为阿拉伯数字)
UL和ol都可以嵌套

Definition list(自定义列表)

<dl><dt>First term</dt>自定义列表项<dd>Definition</dd>自定义列表项的定义<dt>Next term</dt><dd>Definition</dd></dl>

Tables

<table border="1"><tr>  <th>someheader</th>  <th>someheader</th></tr><tr>  <td>sometext</td>  <td>sometext</td></tr></table>
th属性中colspan="跨列数"  rowspan="跨行数"

Frames

<frameset cols="25%,75%">  <frame src="page1.htm">  <frame src="page2.htm"></frameset>

Forms

<form action="http://www.example.com/test.asp" method="post/get"><input type="text" name="lastname"value="Nixon" size="30" maxlength="50"><input type="password"><input type="checkbox" checked="checked"><input type="radio" checked="checked"><input type="submit"><input type="reset"><input type="hidden"><select><option>Apples<option selected>Bananas<option>Cherries</select><textarea name="Comment" rows="60"cols="20"></textarea></form>

Entities

&lt; is the same as <&gt; is the same as >&#169; is the same as ©
&nbsp;is the same as space 

Other Elements

<!-- This is a comment --><blockquote>Text quoted from some source.</blockquote><address>Address 1<br>Address 2<br>City<br></address>


Source : http://www.w3school.com.cn/html/html_quick.asp
tips:

1.HTML 布局 - 有用的提示

提示:使用 CSS 最大的好处是,如果把 CSS 代码存放到外部样式表中,那么站点会更易于维护。通过编辑单一的文件,就可以改变所有页面的布局。如需学习更多有关 CSS 的知识,请访问css教程

提示:由于创建高级的布局非常耗时,使用模板是一个快速的选项。通过搜索引擎可以找到很多免费的网站模板(您可以使用这些预先构建好的网站布局,并优化它们)。



0 0
原创粉丝点击