已阅读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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 鱼油提炼工创新实践模拟考核试卷含答案
- 煤气化工岗前深度考核试卷含答案
- 高中地理必修二 第三单元 第二节 工业区位选择 教学设计
- 小学六年级英语教学设计:Recycle Day 8 A farewell party 核心素养导向下的单元整合与实践
- 高中二年级化学:食品安全主题班会-食品添加剂的奥秘教学教学设计
- 高三语文思拼型作文审题立意一轮复习教学设计
- 拉床工班组评比知识考核试卷含答案
- 陶瓷挤出成型工岗前安全生产规范考核试卷含答案
- 制胚剖片工操作知识能力考核试卷含答案
- 煤直接液化操作工操作竞赛考核试卷含答案
- 2026-2027学年小学五年级上册数学全册教案(教学设计)人教版
- (零模)南京市2027届高三年级学情调研语文试卷(含答案)
- 2026中国历史文化街区土地开发中的文保平衡策略
- 市政道路施工扬尘控制方案
- T∕CCEAS008-2026 建设工程造价咨询成果文件质量标准
- 医院检验科生物安全突发事件应急预案
- 外贸企业进出口报关文件模板合集
- 新闻学概论(李良荣)超全版笔记
- 炼油与化工装置离心式压缩机组在线监测系统技术规范
- 2025年【小学】汉字听写大会竞赛题库(含答案)
- 职业暴露培训课件
评论
0/150
提交评论