已阅读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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2024新教材部编版选择性必修3 第10课近代以来的世界贸易与文化交流的扩展 教案
- 墙砖施工合同
- 碘仿粉治疗干槽症的效果评价
- 高血压患者如何控制体重
- 肺泡-动脉氧分压差与二氧化碳分压
- 疫苗针对传染病的:疫苗推进
- 基层高血压管理策略:医养结合模式
- 2024年跨境电商行业产业链及市场格局分析
- 研发项目质量管理协议
- 跃升人生格局创造辉煌成就
- 小学语文教育面临的困难与挑战解析
- 广东联通云计算业务运营等级服务(SLA)标准
- 公司、单位绿植租摆服务方案(技术标 )
- 规则守护员(教案)2022-2023学年心理健康一年级上册 通用版
- 初三学霸学习计划表
- 《预防血管内导管相关血流感染过程质控工具包》解读
- 玻璃水安全技术说明书
- 老人租房免责协议书(3篇)
- 小学劳动教育四年级下册第三单元-1《收取快递》教学设计
- 临床用血和无偿献血知识培训制度
- 探究温度对酶活性的影响说课课件-
评论
0/150
提交评论