HTML元素参考手册 HTML Elements ReferenceWord格式.docx
《HTML元素参考手册 HTML Elements ReferenceWord格式.docx》由会员分享,可在线阅读,更多相关《HTML元素参考手册 HTML Elements ReferenceWord格式.docx(72页珍藏版)》请在冰点文库上搜索。
ThiselementisavailableinHTMLandscriptasofInternetExplorer3.0.
Thiselementisaninlineelement.
Thiselementrequiresaclosingtag.
示例代码
<
!
--Linktoaserver.链接到服务器-->
AHREF="
站长学院主页<
/A>
--Linktoafileinthesamedirectory.链接到同一目录的文件-->
home.htm"
>
home.htm<
--OpenafileinthewindowspecifiedbyTARGET.在由TARGET指定的窗口中打开文件-->
ATARGET="
viewer"
HREF="
sample.htm"
Openinwindow<
--IncludeanIMGelementasapartofthelink.将IMG元素作为链接的一部分。
-->
SRC="
../images/logo/blabla_logo01.gif"
link<
--Linktoananchor.链接到锚。
#anchor"
anchor<
--Defineananchor.定义一个锚-->
ANAME="
anchor"
--InvokeaJScriptfunction调用JScript函数-->
javascript:
window.open()"
acronym
表示取首字母的缩写词。
Indicatesanacronymabbreviation.
此元素在InternetExplorer4.0及以上版本的HTML和脚本中可用。
TheacronymelementisavailableinHTMLandscriptasofInternetExplorer4.0.
ACRONYM>
MSN<
/ACRONYM>
另见
address,cite,dfn,em,i
address
表示特定信息,如地址、签名、作者、文档信息。
Specifiesinformation,suchasaddress,signature,andauthorship,ofthecurrentdocument.
InternetExplorer将address元素的内容以斜体显示。
此元素在InternetExplorer3.0及以上版本的HTML中可用,在InternetExplorer4.0及以上版本的脚本中可用。
此元素是一个块元素。
InternetExplorerdisplaysthecontentofanaddresselementinitalics.
ThiselementisavailableinHTMLasofInternetExplorer3.0,andinscriptasofInternetExplorer4.0.
Thiselementisablockelement.
ADDRESS>
Thistextwillbeitalic.此文本将以斜体显示。
/ADDRESS>
acronym,cite,dfn,em,i
applet
在页面上放置可执行内容。
Placesexecutablecontentonthepage.
要使用由applet元素指定的可执行内容,用户的计算机上必须安装Microsoft虚拟机(Microsoftvirtualmachine)。
此元素在InternetExplorer3.0及以上版本的HTML中可用,在InternetExplorer4.0及以上版本的的脚本中可用。
此元素是一个内嵌元素。
Touseexecutablecontentspecifiedbytheappletelement,auser'
scomputermusthavetheMicrosoftvirtualmachine(MicrosoftVM)installed.
标准信息
该对象已不建议使用,将可能在今后HTML标准中废弃。
ThisobjectisdeprecatedinHTML.
见http:
//www.w3.org/TR/html401/index/elements.html
area
定义一个客户端图像映射中一个超级链接区域的形状、坐标和关联URL。
Definestheshape,coordinates,andassociatedURLofonehyperlinkregionwithinaclient-sideimagemap.
在同一个
map元素中可包含任意多个
area元素。
COORDS值的格式取决于SHAPE标签属性的值。
此元素不会改变显示格式。
Anynumberofareaelementscanbecontainedwithinthesamemapelement.
TheformatoftheCOORDSvaluedependsonthevalueoftheSHAPEattribute.
Thiselementisnotrendered.
Thiselementdoesnotrequireaclosingtag.
下面的例子提供了一个太阳系的图像映射代码。
该代码在
map元素中使用
area元素及其COORDS值和SHAPE标签属性创建了由图象映射指向单个行星图像的链接。
要返回到太阳系图像映射,用户可以单击后退按钮。
Thisexampleprovidesthecodeforanimagemapofthesolarsystem.Itcreateslinksfromtheimagemaptoindividualimagesoftheplanetsusingtheareaelementwiththemapelement,COORDSvalue,andSHAPEattribute.Theuserclicksthesunoranyplanettolinktoanindividualimage.Toreturntothesolarsystemimagemap,theuserclickstheBackbutton.
P>
IMGSRC="
solarsys.gif"
WIDTH=504HEIGHT=126BORDER=0ALT="
SolarSystem"
USEMAP="
#SystemMap"
MAPNAME="
SystemMap"
AREASHAPE="
rect"
COORDS="
0,0,82,126"
sun.gif"
alt="
sun"
circle"
90,58,3"
merglobe.gif"
mercury"
124,58,8"
venglobe.gif"
venus"
162,58,10"
earglobe.gif"
earth"
203,58,8"
marglobe.gif"
mars"
poly"
221,34,238,37,257,32,278,44,284,60,281,75,288,91,267,87,253,89,237,81,229,64,228,54"
jupglobe.gif"
jupiter"
288,19,316,39,330,37,348,47,351,66,349,74,367,105,337,85,324,85,307,77,303,60,307,50"
satglobe.gif"
saturn"
405,39,408,50,411,57,410,71,404,78,393,80,383,86,381,75,376,69,376,56,380,48,393,44"
uraglobe.gif"
uranus"
445,38,434,49,431,53,427,62,430,72,435,77,445,92,456,77,463,72,463,62,462,53,455,47"
nepglobe.gif"
neptune"
479,66,3"
pluglobe.gif"
pluto"
/MAP>
演示示例
b
指定文本应以粗体显示。
Specifiesthatthetextshouldberenderedinbold.
ThebelementisavailableinHTMLasofInternetExplorer3.0,andinscriptasofInternetExplorer4.0.
B>
Thistextdisplaysboldface.此文本以粗体显示。
/B>
strong
base
指定一个显式URL用于解析对于外部源的链接和引用,如图像和样式表。
SpecifiesanexplicitURLusedtoresolvelinksandreferencestoexternalsourcessuchasimagesandstylesheets.
元素说明
当使用时,base元素必须出现在文档的head内,在任何用于引用外部资源的元素之前。
此元素不改变内容的显示格式。
此元素不需要关闭标签。
Whenused,thebaseelementmustappearwithintheheadofthedocument,beforeanyelementsthatrefertoanexternalsource.
下面的例子设置了文档的基础URL到一个引用文件夹。
InternetExplorer使用
base元素来解析指向的链接。
ThisexamplesetsthebaseURLofthedocumenttoareferencefolder.InternetExplorerusesthebaseelementtoresolvethelinkto
HTML>
HEAD>
<
BASEHREF="
/HEAD>
BODY>
Click<
properties/href_2.asp"
here<
tolearnaboutthe
hrefproperty.
/BODY>
/HTML>
下面的例子表示,如在文档中指定了合法的base元素,则从文档中获取基础URL;
反之,返回null。
ThisexampleretrievesthebaseURLfromthedocumentifavalidbaseelementisspecifiedinthedocument.Otherwise,thefunctionreturnsnull.
SCRIPT>
functionGetBase()
{
varoBaseColl=document.all.tags('
BASE'
);
return((oBaseColl&
&
oBaseColl.length)?
oBaseColl[0].href:
null);
}
/SCRIPT>
basefont
设置显示文本时作为默认字体的基础字体值。
Setsabasefontvaluetobeusedasthedefaultfontwhenrenderingtext.
此元素仅可在body元素或
head元素中使用。
BASEFONT应该出现在文档body中的任何显示文本之前。
此元素不改变内容显示格式。
ThiselementcanbeusedonlywithintheBODYelementortheHEADelement.BASEFONTshouldappearbeforeanydisplayedtextinthebodyofthedocument.
元素示例代码
下面的例子使用BASEFONT元素来设置基础字体大小,而FONT元素用来临时覆盖此设置。
ThisexampleusestheBASEFONTelementtosetthebasefontsize,andtheFONTelementtotemporarilyoverrideit.
--NoBASEFONTsizespecifiedyet.-->
BASEFONTSIZE=4>
SettheBASEFONTsize.
FONTSIZE=2>
TemporarilyoverridetheBASEFONTsize.<
/FONT>
--ResumetheBASEFONTsize.-->
bdo
允许作者为选定文本片断禁用双向法则。
Allowsauthorstodisablethebidirectionalalgorithmforselectedfragmentsoftext.
BDO元素可用于控制文本块的阅读顺序。
Unicode双向算法会根据所嵌入的字符序列的方向特性将其自动反转。
例如,英语文档的基本方向是由左至右(ltr)。
如果文档内某一段包含了阅读顺序为由右至左(rtl)的语言,你就可以应用双向算法来反转该语言的方向。
双向算法和DIR标签属性通常足以应付嵌入方向的变更。
但是,当你将格式化后的文本交由双向算法处理时,可能会发生错误。
例如,以电子邮件格式化后的包含英语和希伯莱语的文本段将被双向算法不正确地转换。
由于希伯莱语文本的阅读顺序已经以电子邮件格式转换过了,对其应用双向算法则导致再一次对该文本进行转换。
BDO元素将关闭双向算法并控制阅读顺序。
当你使用BDO元素时必需连用DIR标签属性。
此元素在InternetExplorer5.0及以上版本的HTML和脚本中可用。
TheBDOelementcanbeusedtocontrolthereadingorderofablockoftext.
TheUnicodebidirectionalalgorithmautomaticallyreversesembeddedcharactersequencesaccordingtotheirinherentdirection.Forexample,thebasedirectionofanEnglishdocumentisleft-to-right(ltr).Ifportionsofaparagraphwithinthisdocumentcontainalanguagewiththeright-to-left(rtl)readingor