初识HTML

HTML元素为包括标签在内的,开始标签与结束标签之间的所有内容,空的HTML元素没有结束标签
HTML属性是在开始标签中定义的,形式为name="value",如果value中有 "" ,则用 ' ' 引用value

<!DOCTYPE html> 告诉浏览器HTML文件版本为 HTML 5,不是标签
<h1>~<h6> 标题
<hr>  horizontal line,水平线,无结束标签
<br>  换行,无结束标签
<!--   -->  注释


Formatting
 <b>  bold
 <i>  italic
 <sub>  下标
 <sup>  上标
 <small>  小号字体
 <code>  computer code
 <var>  computer variable
 <pre>  preformatted,适合显示代码,可以显示空格与换行
 <address> 作者信息
 <del>  删除线
 <ins>  下划线
 <mark>  加底纹
 <blockquote> 引用大块信息,浏览器会自动缩进,属性 site=" www.baidu.com"
 <q>  引用少量信息,会加上引号
 <abbr>  显示缩写的信息,eg: <abbr title="World Wide Web">WWW</abbr>
 <bdo>  bi-directional override,文字方向,eg:<bdo dir="rtl">These words will be displayed from the right to the left (rtl).</bdo>


<a> link
 href  定义链接地址,
 target  定义打开链接位置(_blank 表示新标签)
 id  定义书签 eg:<a id="bookmark">This is a mark.</a>    <a href="#bookmark">Click here will go to mark.</a>

<head> container
 <title>  显示在浏览器标签上的标题
 <base>  定义全局的URL/target,无结束标签
 <meta>  information about description ,keywords and author,无结束标签,eg:<meta name="keywords" content="HTML,CSS,JS">
 <link>  each page link to the external style sheet,无结束标签
 <style>  internal style sheet,eg:  p{color:red;}

<img> image
 src 图片URL
 alt 当图片无法显示时,可替换的图片名称
 width 图片宽度
 height 图片高度

<table> 表格
 border 边线宽度,eg:border="0",无边线 
 <tr> table row,行 
 <td> table date,每一个单元格
 <th> table heading,eg:<th rowspan(colspan)="2">TEXT</th>  占 2 行(列)
 <caption>表格标题

<form> action="URL",当点击 submit 后,信息会被发送到该URL
 <input> type="text/password/radio/checkbox/submit/button/reset",name="",value="",size="",无结束标签
 <select> drop-down list,下拉菜单,name=""
  <option> 选项,value=""
 <fieldset>
  <legend>

<iframe> inline frame,在网页中显示其他网页
 scr  网页地址
 width
 height
 frameborder 边框,为0时表示无边框
 name

<ol> orderd list,type="A/a/I/i"
<ul> unorderd list
 <li>
<dl> description list
 <dt>
 <dd>

<textarea>文字区域,rows="",cols=""

style propertise  属性
 text-decoration:none; 文字无装饰,链接无下划线
 text-align:center;  居中显示
 color:yellow;  颜色为黄色
 background-color:red; 背景为红色,也可表示为 #FF0000,rgb(255,0,0)
 font-family:comic sans ms; comic sans ms字体
 font-size:20px;  字体大小为20px
 margin-left:20px;  左侧边距为20px
 float:left;   图片在左侧悬浮
 width:20px  单元格宽度
 border-collapse:collapse 边线折叠
 border-spacing:20px  两单元格间距
 padding:1px  内容与边线间距
 list-style-type:disc  ul的style样式,有disc/circle/square

 

posted @ 2014-02-18 11:41  TEALS  阅读(120)  评论(0)    收藏  举报