已阅读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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 《网络空间安全概论》课件5-2(1)网络攻击概述
- 2024年危险化学品管理专项考核试题
- 一年级至六年级里的所有数学公式和概念
- 液压与气压传动技术(微课版)教案 1.2液压油的选用
- 供应、工程类统计表
- 中学语文骨干教师培训心得体会
- 电商扶贫方案
- 吾悦广场商场开业仪式开业庆典周年庆活动方案
- 幼儿园大音乐活动《天里来》
- 人力资源管理基础技能(含活页练习册) 课件 2任务一 搭建组织框架
- 医院消化科“十四”学科发展规划
- 软件正版化培训课件
- 混凝土裂缝检测
- 2022-2023学年江苏省泰州市姜堰区七年级(下)期中道德与法治试卷(含解析)
- 《乡土中国》整本书研读+说课稿 统编版高中语文必修上册
- 小学劳动教育四年级下册第三单元-1《收取快递》教学设计
- ZLP630高处作业吊篮使用说明书
- 探究温度对酶活性的影响说课课件-
- 自然辩证法概论-北京化工大学中国大学mooc课后章节答案期末考试题库2023年
- 2021年高考山东卷化学真题含答案解析
- 2023年陕西延长石油(集团)有限责任公司招聘笔试题库含答案解析
评论
0/150
提交评论