




已阅读5页,还剩5页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
HTMLTutorial-PrefaceHtmlisoneoftheeasiestlanguagestolearn.ThistutorialwillexplainhowtowriteHtmlwebpages,whatHtmlis,andhowtoprograminHtml.HtmlstandsforHyperTextMarkupLaguage.TheonlyuseforHtmlisforwritingwebpages.Awebpageisreallyaprogram,onlyaverysimpleone.WhatiseasyaboutHTMListhat:1.Thereisnocompiling,and2.Itissimplecodingonly.Therearenofunctions,loops.Bugsarealmostimpossibletomakeandeasytofix.TouseHtml,youcanofcourseuseanHtmlwizardprogramwhichwoulddefeatthewholepurposeofthistutorial,oryoucanuseasimpletexteditor,savethetextasan.htmfile(or.htmlforaMacintosh),andviewitwithyourbrowser,suchasNetscapeorMicrosoftInternetExplorer.ThistutorialisbeingwritteninordinaryNotepad,soyoudontneedanythingspecial.Ifyoudonotalreadyhaveawebbrowser,youcandownload:NMSIEHTMLTutorial-Chapter1Tags,andtheSkeletonLayoutBeforeanything,HTMLiswrittenintags.Tagsarelikethecommandwordsthatmakeupthelanguage.Atagiswrittenlikethis:.Anexampletagwouldbe,andothers.Theentirecodeismadeupmostlyoftags,tagstellthewebpagewhattodo.Sometimesatagstartssomething,likeforinstancewillmakeallthetextafteritturnbold.Orwillmakeanythingafteritbecomethetitle.Butinsomeinstances,likesectiontags,youwillneedtoendatag.Forexample,sayyouuseatagbeforeatext.Thatsallfineandwell,buteverythingaftertheboldtagwillbecomebold.Theentirepage.Youmayonlywanttomakeoneworldbold.Thereforyoumustendatagwhichwillstopitsactions.Tostopatagyouusethisformat:Forexample:Thisisbold!Thisisnt!Youlllearnmoreaboutothertagsinthechapterstocome.OnegoodthingaboutHTMListhatitalwaysfollowsonelayout.ThefollowinglayoutisanentireHtmlwebpage:ThisistheTitle!WelcometomyWeb-Page!Thisisthebasiccode,calledaskeletonlayout.YoushouldalwaysstartyourHtmlcodeinthatway.Nowletsexplainsomeofthetags.Thetagsyousawintheexampleareusedonlyonceusually.Hereisjustanexplanationofthelayouttags.Eachtagintheskeletonlayoutstartsorendsasection.AsectioninHtmldeclareswhenacertainpartoftheHtmlcodeisbeginning.-StartstheHtmlsection.(Beginsthepage)-StartstheHeadersection.ThisistheTitle!-Starts(andends)thetitlesection.-StartstheBodysection.(Mainpartofpage)-EndstheBodysection.-Endsthepage.TheHtmlsectioncontainstheentirecode.TheHeadersectioncontainstheTitlesection,andsomeotherstuff.Thetitlesectioncontainsthetextthatgoesinthetitlebaratthetopofthebrowserwindow,likeWelcometoMyPage!-Netscape.Thebodysectionisthemainpartofthepagethatcontainsallthetextthatappearsinthepage.HTMLTutorial-Chapter2BodyAttributesTheBodytaghasmoretoitthanjust.Thetagalsocontrolsthecolorofthepagetext,thebackgroundofthepage,andothers.Anattributetoanytag(inthisinstance,itwillbethetag)isanextrakeywordthatcanbesetinsidethetagthatallowsforcertainthingstobeset.Tosetabodyattribute,likethebackgroundofthepage,yousimplyincludetheoptioninthetagandwhatitissetto.Example:Thereareafewbodyattributesthatyouwilllearnfornow.Background,text,link,andactivelink.TheBackgroundiscontrolledwitheitherBGCOLOR=colororBACKGROUND=/background.gifIftheBackgroundyouwantisasolidcolor,likeblack,blue,white,red,etc,youusetheBGCOLORoption.BGCOLORacceptsBGCOLOR=blue(acolorname),orBGCOLOR=Hexadecimalnumber.AHexnumbercandomorevariantcolors,suchasgold,turquoise,navyblue,andmostothercolors,whilejusttypingacolornamelikeblueorwhiteislimitedtosimplecolors.Afewsimplecolorsareblue,white,black,green,yellow,orange.Mostlyfirst,secondary,andtertiarycolors.TheBACKGROUNDoptionisforifyouwanttouseapictureasabackground.YoumustusetheURLofthepicture,like:GraphicsinanywebpagemustbeineitherGIF(.gif)orJPEG(.jpg)format.Thenextoptionistext.Textisthecolorofallnormaltextinthepage.Itfollowsthisformat:text=colorortext=hexnumber.ThisfollowsthesameroutineasinBackground;acolornamewillacceptsimplecolors,ahexnumbercandomoreexoticcolors.Thenextoptionislink.Thisisthecolorofalllinksonthepage.Itsformatisthesameasthetextoption.Thenextisalink.Thisisthecolorofalinkthatisbeingclickedon.Forexample,andyouclickonit,untilyouletgo,thatlinkwillturntothealinkcolor.Itfollowsthesameformatasthetextoption.Thelastoptionyouwilllearnisvlink.Vlinksetsthecolorofalllinksthathavebeenvisitedinthepast.Itfollowsthesameformatasthetextoption.NOTE:IfyouleaveoutanoptionintheBodytag,itwillbesettoadefaultcolor.HTMLTutorial-Chapter3TextTagsNowthatyouvelearnedbodyoptions,youcannowlearnhowtoaddtexttothebodysection,andhowtomakeitlookFuNkY!Before,youlearnedalittleabouttagsandhowtheywork.Tagsareimportanttotextbecausetheycanchangethewaytextlooks,andacts.Letstakealookatanexampletolearnafewbasictags.TextExampleThisismyfirst,ordinaryparagraph.Thisismysecond,boldparagraph.Thisismythird,italicsparagraph.Thisismyfourth,underlinedparagraph.Thisismyfifth,BlInKiNgparagraph.Thisismylast,centeredparagraph.Thetagstandsforparagraph.Itstartstextonanewline.Without,allthetextwouldbeinonelineandwrappedaround,anditwouldlookprettymessedup.Inthesecondparagraph,therewasa(orforfull)tag.Boldmakesalltextinsideofitbecomebolder.Asyoulearnedbefore,sometagsneedtobeended.Thisisoneofthem.Ifyoudidntendaboldtag,everythingafterthewouldbebold,eventextthatyoudidntwanttobebold.Toendatag(stopwhatatagisgoing,usethisformat:.Thus,toendaboldtag,youuse(orforshort,).standsforItalics.Anythingafterandbeforewillbecomeitalic,orslanted.standsforunderlined.Anythingafterandbeforeisunderlined.setsthealignmentfortext.YoucouldalsocentertextbyusingCenteredText,butisaloteasier.Centermakestextgointhecenterofthescreen.Youcanalsouse:Thissetsalignmenttotheleft.Thissetsalignmenttotherightofthescreen.NOTE:Ifyouuseoption,liketosetalignment,inordertostopitseffectyoumustendit,byusing.makestextblinkrepeatedly.Becarefulnottooverdotheblinktag,asitcantendtogetveryannoying.Hereareafewmoretexttagswithbriefexplanations.Youcanexperimentwiththem:-Teletype-Predefined.HTMLusuallyignoresextraspaceswhichcanbebadfordocumentswhichdependonindependentformatting.-Makestextgenerallybig.-Hm.-Strikethrough,makesahorizontallinethroughthecenteroftheselection.-Superscript.-Controlsfont,andcanalsomaketextbiggerthanpossiblewithjust.I.e.or.meanstheactualfont,likeCourier.Itisalsopossible
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- (2025年标准)广场临时租赁协议书
- (2025年标准)光盘制作委托协议书
- 新兴旅游市场开发与营销策略研究报告
- (2025年标准)挂靠公司承包协议书
- (2025年标准)挂户口协议书
- (2025年标准)雇员致人损害协议书
- 农村电商社会责任与公益事业手册
- 市场推广和营销策略保密协议
- 工业自动化控制操作作业指导书
- 高校学术研讨线下活动流程
- 小儿哮喘病护理
- 中华护理学会老年人误吸的预防团体标准解读
- 日光性皮炎的临床特征
- 中建型钢混凝土结构施工方案
- 《头发头皮生理学》课件
- 数据中心暖通培训
- 有限空间专项安全检查表
- 广西桂林旅游文化宣传城市介绍文旅科普美食
- 学校栏杆工程施工方案
- 2025年高考语文备考之名著阅读《红楼梦》与《乡土中国》衔接融合习题含答案
- 2024年锅炉操作工(技师)职业鉴定理论考试题库(含答案)
评论
0/150
提交评论