




已阅读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江苏连云港恒驰实业有限公司招聘5人考前自测高频考点模拟试题有答案详解
- 公司动车组维修师特殊工艺考核试卷及答案
- 公司活性炭生产工创新方法论应用考核试卷及答案
- 建设项目施工前期准备与管理方案
- 钢结构工程进度控制与管理方案
- 大人们这样说的课件
- 建筑木结构施工方案
- 2025广西钦州市北部湾大学招聘高层次人才53人模拟试卷及答案详解(有一套)
- DL-T5745-2021电力建设工程工程量清单计价规范
- MOOC 英文学术写作实战-北京大学 中国大学慕课答案
- 电气系统故障诊断
- 《呼吸与健康生活》作业课件
- 外资机构持股能提升股票定价效率吗?-来自A股纳入明晟新兴市场指数的经验证据
- 悬挑工字钢验收表
- 宝马5系GT说明书
- 追究刑事责任的控告书范例(标准版)
- 讲义配电房可视化管理标准课件
- 高中音乐(必修)《音乐鉴赏》 (人音版)《家国情怀的民族乐派》格林卡与穆索尔斯基《荒山之夜》
- 陕西省引汉济渭三期工程环评报告
评论
0/150
提交评论