html5 html programming crash -...

797

Upload: others

Post on 08-Jul-2020

10 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999
Page 2: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

HTML5LearnHTML5DevelopmentFromScratch!

HTMLPROGRAMMINGCRASH

Page 3: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

COURSEUpAndRunningWithHTMLProgramming

HTML+CSSSTEPBYSTEPHTML+CSSInA

Page 4: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Day:LearnTheBasics,AndWriteKillerCodes!FREEPROMOSFromAZElitePublishingClickHereToReceiveWeeklyFreeandDiscountedKindleBooksInYourInbox

Page 5: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Publishedby:AzElitePublishingInc.http://azelitepublishing.gr8.com/

ISBN:973-332-00389-3

ManufacturedinCanadaPublishedsimultaneouslyinCanada1093830234Nopartofthispublicationmaybreproducedortransmittedinanyformbyanymeans,electronic,mechanical,photocopying,recording,orotherwise,withoutthepriorwrittenpermissionof

Page 6: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

thepublisher.Forinformationongettingpermissionforreprintsandexperts,[email protected]:Theinformationinthisbookisdistributiononas“AsIs”Basis,withoutwarranty.Whileeveryprecautionhasbeentakeninthepreparationofthisbook,neithertheauthornorpublishershallhaveanyliabilitytoanypersonorentitywithrespecttoanyloseordamagecausedorallegedtobecauseddirectlyorindirectlybytheinstructionscontainedinthisbookorbythecomputersoftwareandhardwareproductsdescribedinit.

Page 7: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

ISBN:973-332-00389-3

Page 8: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

HTML5LearnHTML5DevelopmentFromScratch!DISCLAIMERIntroductionToHTML5WhatYouShould

Page 9: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

KnowAboutHTML5WhyYouShouldLearnHTML5WhomIsThisBookFor?Chapter1:TheEssentialsOfHTML5DrawingWithCanvasElementDraggingAnd

Page 10: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

DroppingNewWebFormControlsEditingWebPagesOnTheGoHandlingBrowserHistoryInterdocumentMessagingSuperbAudioAnd

Page 11: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

VideoSupportWebStorageNewElementsSummaryChapter2:TheCanvasElementTheSpecificationsTheCanvasAPIStyling

Page 12: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

SettingUpLineStylesCastingShadowsDrawingRectanglesDrawingComplexShapesDrawingTextDrawingImagesUsingTransformations

Page 13: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

GettingStartedWithCanvasSummaryChapter3:DraggingAndDroppingDragAndDropDragAndDropAPITheDraggableAttributeTheOnDragEnter

Page 14: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

AttributeTheOnDragOverAttributeTheOnDropAttributeTheOnDragStartAttributeTheOnDragEndAttributeStartingADragAnd

Page 15: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

DropExampleStylingTargetAndDraggableElementsSummaryChapter4:WebFormControlsIntroductionToWebFormControlsWebFormsExampleCreateADefault

Page 16: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

ControlURLControlExampleSummaryChapter5:InlineEditingGettingToKnowInlineEditingcontenteditabledesignmode

Page 17: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

spellcheckSummaryChapter6:WorkingWithBrowserHistoryTheHistoryAPIwindow.history.lengthwindow.history.back()window.history.forward()window.history.go([delta])

Page 18: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

window.history.pushState(data,title[,url])window.history.replaceState(data,title[,url])window.onpopstatepop-history.htmlExampleAddABackButtonAddAForwardButton

Page 19: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

AddAGoButtonSummaryNewElementsInHTML5WhereToGoFromHere

Page 20: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

HTMLPROGRAMMINGCRASHCOURSEUpAndRunningWithHTMLProgramming

Page 21: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

DISCLAIMERIntroductionToCourseChapter1:AnIntroductionToHTMLWhatIsHTML?UtilityOfHTMLTexts

Page 22: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Chapter2:HTMLTagsTypesOfHTMLTagsPurpose-BasedTagsBasicCodesForPageStructureTheHeadTagTitleTagsBodyTags

Page 23: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

HTMLElementsUsingHTMLHeaderElementsUsingFrameElementsUsingFormElementsUsingTextFormattingElementsSummaryQuestions

Page 24: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Chapter3:FormattingSummaryQuestionsChapter4:AddingParagraphsLineBreaksChapter5:AttributesSimpleAttributesFragmentAttributes

Page 25: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

DynamicAttributesSummaryQuestionsChapter6:CreatingHTMLFramesColsRowsBorderFrameborder

Page 26: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

FramespacingSrcNameFrameborderMarginwidthMarginheightNoresizeScrollingLongdesc

Page 27: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Chapter7:CSSCSSTransitionsCSSAnimationsDetectingWhenATransitionIsCompleteSummaryChapter8:MakingTheHelloWorldAppWithHTMLTexts

Page 28: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Conclusion

HTML+CSSSTEPBYSTEPHTML+CSSInADay:LearnTheBasics,AndWriteKillerCodes!

Page 29: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

DISCLAIMERIntroductionToCourseChapter1:IntroductionToHTMLAndCSSHTMLElements,TagsAndAttributes

Page 30: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

QuestionsChapter2:HowToUseHTMLToMakeYourOwnWebPageHowToSetupOurOwnHTMLDocumentHelloWorldNestedElementsBlock-LevelElements

Page 31: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Self-ClosingTagsErrorsAndSolutionsApplyingWhatYouHaveLearnedSummaryQuestionsChapter3:MoreOnHTMLSemantics

Page 32: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

HowToIdentifyDivisionsAndSpansCommentsHowtoUtilizeText-BasedElementsHowtoBuildStructureUsingHTMLSummaryQuestions

Page 33: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Chapter4:CascadeStyleSheetsSelectorsReferencingCSSWithinHTMLSummaryQuestionsChapter5:MoreOnCSSProperties

Page 34: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

HowToCombineSelectorsWorkingWithSpecificityInCombinedSelectorsHowToKeepSpecificityWeightsLowLengthsSummary

Page 35: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Chapter6:TheBoxModelIntroductionToTheBoxModelApplyingTheBoxModelSummaryQuestionsChapter7:HowToPositionContent

Page 36: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

FloatsTypesOfFloatsSummaryChapter8:TypographyAddingColorToYourTextFontPropertiesFontSize

Page 37: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

AdjustTheLineHeightSummaryConclusionDescription

$1000BLUEPRINT5ProvenStepsTo

Page 38: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

MakeYourFirst$1,000AsAFreelancer,EvenIfYouHaveNeverMadeADollarOnlineBefore!IntroductionFearOfBeingPaidFearOfFacingThe

Page 39: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

CompetitionFearOfClosingDoorsOnACareerAsCoder/ProgrammerFreelancingYourExpertiseSuccessfulFreelancingStep#1SelectingPlatformsWritingYourProfile

Page 40: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

SampleProfileTakingExamsStep#2FindingClients—BiddingOnProjectsStep#3CreatingWorkSamplesStep#4Reviews—BuildingAPortfolioAndRepeatClients

Page 41: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Step#5ManagingTimeAndResourcesCompilingWords

Page 42: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

DISCLAIMERCopyright2015©AllRightsReservedNopartofthispublicationmaybereproducedinanyformorbyanymeans,includingprinting,scanning,

Page 43: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

photocopying,orotherwisewithoutthepriorwrittenpermissionofthecopyrightholder.TheAuthorhasstrivedineverywaytobeasaccurateandcompleteaspossibleinthecreationofthisbook,notwithstandingthefactthat

Page 44: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

hedoesnotwarrantorrepresentatanytimethatthecontentswithinthebookareaccurateduetotherapidlychangingnatureofthesubject.Whileallattemptshavebeenmadetoverifyeachandeverypieceofinformationprovided

Page 45: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

inthispublication,theAuthorassumesnoresponsibilityforanyerrors,omissions,orcontraryinterpretationofthesubjectmatterherein.

Page 46: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

IntroductionToHTML5HTML5isahottopicfordevelopers,noquestionsasked.HTML5istheheirofHTML4.01,whichwasreleasedwaybackin1999.HTML5worksinconjunction

Page 47: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

withCSS3andisstillindevelopment.Eversinceitwasreleased,ithasbeenundercontinuousdevelopment.TheWorldWideWebConsortium(W3C),acommunityofmemberorganizationsandfulltimestaffthatdevelopstandardsfortheWorldWide

Page 48: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Web,continuestoaddimpressivefeaturesanditseemshighlyunlikelythatthedevelopmentofthelatesthypertextmarkuplanguagewouldcometoanendanytimesoon–whichisagoodthinginsomeways.HTML5isbasedonthefollowingpre-setstandards:

Page 49: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

▪ThenewfeaturesofHTML5mustbebasedonHTML,DOM,CSS,andJavaScript▪Therequirementforexternalplug-ins,suchasFlash,mustbereduced▪Ascomparedtopreviousversions,errorhandlingshouldbemadeeasier

Page 50: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

▪Moremarkupshouldreplacescripting▪Itshouldbedevice-independent▪Thedevelopmentshouldbevisibletothepublic

Page 51: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

WhatYouShouldKnowAboutHTML5ItisvitalthatyoukeepinmindthatHTML5isbuiltuponthesuccessofHTML4.01–whichwasundeniablythebestversioneverreleased.InordertobeabletouseHTML5,youdonotneedtooverlookthebasicsof

Page 52: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

HTML’spreviousversion.Youarenotlearningacompletelynewlanguagehere;infact,ifyouhavenoknowledgeofHTML4.01,thenitisessentialthatyoufirststudythatbeforemovingontoHTML5.StartingoffwithHTML5wouldbelikerunningbefore

Page 53: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

youevenlearnedtowalk–whichwouldbeimpossible.TherearemanybasicsofHTML5thatarecontainedinthepreviousversion.Withthatsaid;ifyouwishtomasterHTML5,youmustgobackandlearnformerversionsofHTML.Onemajoradvantageof

Page 54: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

HTML5isthatitworksrightoutofthebox.Itissupportedbyallmajorbrowserscurrentlyavailable.Also,ifyouareapartofadesignbusiness,oneofthegravestmistakesyoucanmakeisstickingtoHTML4.01becauseeveryonewillmoveforward,leavingyoubehind.

Page 55: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

ThereisnodoubtwhatsoeverthatHTML5hascomeheretostay.Ithasbeencreatedtomanagetheincreasinglyadvancednecessitiesoftoday;andbecauseitisinacontinuousdevelopmentphase,itwillintroducenewfeaturesthatareboundtoimpresseventhemost

Page 56: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

demandingofdevelopers.

Page 57: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

WhyYouShouldLearnHTML5HTML5isapowerfulwebmarkuplanguagethatenableswebdesignerstobuildrich,webbasedapplicationsthatcanrunonanydeviceusingabrowserthathasHTML5support;asmentionedpreviously,allmajor

Page 58: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

browserssupportHTML5.Currently,nativeappsthathavebeenwrittenforGoogle’sAndroidorApple’siOSoperatingsystemsleadthemobiledevelopmentfield.However,HTML5offersmanyadvantagesoverthesenativeapplications.Tobeginwith,HTML5isan

Page 59: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

openandweb-basedstandardthatiscapableofrunninginanywebbrowser.ThismeansthatdevelopersarenolongerboundtotheclosednativeappecosystemsofAppleandGoogle.ThisallowswebdeveloperstofreelypromotetheirHTML5appsontheweb.

Page 60: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Secondly,HTML5possessopenwebstandardsthatenabledevelopersandbusinessestoeffectivelycontrolmonetization,distributions,andtheoverallfunctionalityoftheirapplications–regardlessofwhetherdesktopormobile.Itistruethatnativeappscome

Page 61: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

withanintegrateddirectpaymentsystemthatallowsone-clickpayments;nonetheless,developershavetopayamajorportion(almost30percent)ofthetransactiontothegatekeepers(i.e.AppStoreandGooglePlay).Inaperiodofbetween3to5

Page 62: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

years,HTML5wouldbecomethestandardprogramminglanguagefortheweb.NotonlyHTML5wouldallowcreationofhighlyinteractivecontent,butwiththeever-increasingfeaturesofHTML5,websiteswouldbeabletoofferfunctionalityandfeaturesthatequalorexceed

Page 63: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

thatofnativeapps.

Page 64: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

WhomIsThisBookFor?ThisbookisforpeoplewhohaveathoroughunderstandingofthebasicsofHTML4.01,andwishtoenhancetheirdevelopmentskillbyassimilatingwhatHTML5offers.Itishighlyrecommendedthat

Page 65: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

youlearnpriorversionsofHTMLasaprerequisitetostudyingHTML5.ThebookwillstartoffbydiscussingtheessentialsofHTML5.Here,thereaderwillbeabletogetaglimpseofwhat’snewinthelatestversionofthismarkuplanguage.Thefollowing

Page 66: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

chapterswouldthenbuildonanddiscussHTML5’sfeaturesingreaterdetail.AbriefChapterSummaryfollowsattheendofeachchaptertohighlightafewkeypoints.Itisrecommendedthatyoufollowthestepbystepexamplesasyouproceedthroughthebook.

Page 67: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Itishopedthataftercompletingthisbook,thereaderwillhaveafairunderstandingofthebasicsofHTML5.Goodluck!

Page 68: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Chapter1:TheEssentialsOfHTML5Inthischapter,youwilllearnaboutessentialsofHTML5,including:

•Drawingwithcanvaselement

Page 69: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

•Dragginganddropping•Newwebformcontrols•Editingwebpagesonthego•Handlingbrowserhistory•Interdocumentmessaging•Superbaudioandvideosupport•Webstorage•Newelements

HTML5hasbrokenthebarrierthatstoodbetween

Page 70: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

scriptingandHTML.Ithasturnedouttobeextremelyscript-intensive.Itoffersanumberofnewelementsaswellasattributes;however,themajorimprovementinHTML5arerelatedtothefeaturesthatcanonlybeaccessedthroughscripting.HTML5reliesheavilyon

Page 71: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

scripting,regardlessofwhetheritisaboutdragginganddroppingofitems,drawinginacanvasorawholelotofotherthings.Thisscriptingmeans,formostpeople,moreuseofJavaScript.Withthatsaid,inordertomakeHTML5work,youmustusescripting.

Page 72: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Thisisactuallyaverygoodthingbecauseasaresultofthesenewcapabilities,anincreasingnumberofinternetbrowsermanufacturerswouldhavetoimplementsupportforthenewcapabilities.ItisoftenseenthatthecapabilitiesofJavaScriptvaryfromonebrowsertoanother,

Page 73: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

andtheheavyrelianceofHTML5onscriptingwouldhelpmakeallnewfeaturesuniformacrossdifferentbrowsers.LetusnowtakeaquickglanceofthecapabilitiesofHTML5,manyofwhichwewilldiscussindetailinthisbook.

Page 74: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

DrawingWithCanvasElementTheCanvaselementfeaturehasbeenanticipatedforalongtime.Justasitsnamesuggests,thiselementcanbeusedtodrawupon,includingdrawingsomereallycomplexfiguressuchascircles,arcs,curves,andrectangles.Italso

Page 75: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

allowsyoutoinsertimagesandcolorthefigures.ThepowerfulCanvascontrolcaneffectivelyincorporatedynamicgraphicsintowebpages,anddisplaygraphicsthatchangetheirresponsedependingontheuser’sactions.ThisparticularfeatureofHTML5relies

Page 76: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

heavilyonJavaScript,justlikethemajorityofelementsofHTML5.Sobasically,youdoallyourdrawinginJavaScript.Forthemajorityoffigures,youwouldusearelativelysimplefunctionofJavaScript,suchasstroke(),lineTo(),orfill().

Page 77: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

DraggingAndDroppingAnotherlong-awaitedfeatureofHTML5isthedraganddropcapability.BeforethereleaseofHTM5,dragginganddroppingofitemswerecarriedoutbasedonadhocJavaScript–whichneededtobewritteninadifferent

Page 78: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

manneraltogetherfordifferentbrowsers.WiththeadventofthelatestversionofHTML,draganddropfeaturewillbecomeuniformacrossthebrowsers.ThoseofyouwhohavewrittenthedraganddropcodeinJavaScriptwouldunderstandwhatahugehelp

Page 79: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

thiswouldbe.Therewillnolongerbetheneedoftestingyourcodeonindividualbrowserstoseewhetheritisexecutingcorrectlyoneachofthem.ThemajorityofvisualelementsinHTML5possessadraggableattribute.Ifthisattributeissettotrue,users

Page 80: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

caneasilydraganddropthespecificelementaslongastheyimplementitinJavaScript.

Page 81: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

NewWebFormControlsAnumberofnewwebformcontrolsareapartofHTML5,andtheseextendthenumberofcontrolsthatarealreadyavailableinHTML4,suchasoptionbuttons,checkboxes,etc.Justasanexample,

Page 82: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

developerscannowuseacolorpicker,adatetimecontrol,anemailfieldaswellasatelephonenumbercontrol.ThesecontrolsaddalotofpowertoHTML.Forinstance,thecolorcontrolshowsacolorpickerfromwhichausercanchooseany

Page 83: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

colorheorshelikes.Theactualimplementationofeachofthesecontrolsdependsonbrowsermanufacturers;however,manyofthelatestcontrolsarealreadybeingincorporated.

Page 84: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

EditingWebPagesOnTheGoHTML5hasmadewebpagesmoreinteractive,andhasalsoempowereduserstoedittextwithinawebpage.

Page 85: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

HandlingBrowserHistoryHTML5alsoprovidesanenhancedcontrolofthebrowserhistory.Wewilllookatthisinmoredetaillateroninthisbook.

Page 86: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

InterdocumentMessagingHTML5enablesyoutosendmessagesbetweennumerouspartsofadocument.Thisincludeseventhosepartsthatareactuallycomefromvaryingdocuments.Forexample,youmaywanttodisplayawebpageinanother

Page 87: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

webpageusingan<iframe>.WithHTML5,youcannowsendtextmessagestothecontaineddocument.

Page 88: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

SuperbAudioAndVideoSupportAmajoradvancementinHTML5istheenhancedsupportforaudioandvideo.Thebrandnew<video>elementiscapableofdisplayingvideos,whilethe<audio>elementcanseamlesslyplayaudio–allof

Page 89: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

thiscanhappenwithouttheneedofexternalpluginssuchasQuickTimeorFlash!

Page 90: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

WebStorageHTML/JavaScriptauthorsmissedoutontheabilitytostoredatabetweenpageaccessesinthepast.Thismeansthatwheneveryoure-openaparticularwebpagethatcontainsJavaScript,allofyourJavaScriptvariableswererestoredtotheiroriginal

Page 91: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

values.ThishasbeenfixedforgoodinHTML5,andnowthereisanoptiontosavedatawithinthebrowseralongwithsavingitinthebrowser’ssessionwithaparticularserver.

Page 92: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

NewElementsHTML5wouldbenogoodwithoutthenewelementsthatitboastsrightoutofthebox.Wewilldiscussthefollowingnewelementsinthelastchapterofthisbook:

✓<article>

✓<aside>

Page 93: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

✓<audio>✓<canvas>✓<command>✓<datalist>✓<details>✓<embed>✓<figcaption>✓<figure>✓<footer>✓<header>✓<hgroup>✓<keygen>

Page 94: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

ThefollowingelementshavebeendroppedoutandarenolongerpresentinHTML5:

☒<acronym>

☒<applet>☒<basefont>☒<big>☒<center>☒<dir>☒<font>

Page 95: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

☒<frame>

Page 96: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

SummaryInthischapter,wediscussedthebasicsofthecapabilitiesofferedbyHTML5,includingthefollowing:DrawingwithCanvasDraggingandDroppingNewWebFormControls

Page 97: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

EditingWebPagesOnTheGoInterdocumentMessagingSuperbAudioandVideoSupportWebStorageNewElementsYoulearntaboutthenewelementsthathavebeen

Page 98: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

addedto,andtheelementsthathavebeenremovedfrom,HTML5.

Page 99: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Chapter2:TheCanvasElementInthischapter,youwilllearnaboutthecanvaselement:

•TheCanvasAPI•GettingstartedwiththeCanvaselement

Page 100: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

HTML5’sCanvaselementisextremelypopularandisutilizedtoillustrategraphics.ItcanbecreatedeasilyinHTML5inthefollowingway:<canvasheight-”yyy”width=xxx”></canvas>

Page 101: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

TheabovecodeisallthatisneededtocreatetheCanvaselement.Thequestionthatnowcomestomind:howdoyoudrawgraphicswithinthiscanvas?Theansweris:byusingJavaScript,aswewillseeinthischapter.TheCanvaselementis

Page 102: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

capableofdrawinglines,arcs,images,complexshapes,text,andmuchmore.

Page 103: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

TheSpecificationsHerearethespecificationsofthiselement:Element:<canvas>StartTagRequired:YesEndTagRequired:YesNecessaryAttributes:Height&WidthSupportingBrowsers:Firefox,Chrome,Safari,

Page 104: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

OperaDuetothefactthatJavaScriptisnecessaryinorderforthiselementtowork,letuslookatanoverviewofthatisalreadyavailableatourdisposalbeforewejumpintothedetails.

Page 105: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

TheCanvasAPIAspecialapplicationprogramminginterface(API)hasbeencreatedbyW3Cforthisnewcanvaselement.Itspecifiesthenamesofallbuilt-infunctionsandhowtheycanbeused.YoucangettheCanvasAPIatthefollowinglink:http://dev.w3.org/html5/canvas-

Page 106: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

api/canvas-2d-api.html.However,tomakeiteasyforyoutoassimilateusefuldata,wewilllistthemostimportantfunctionsbelow.IntheW3CAPIspecifications,theattributesoftheelementaswellasthesupportedfunctionsofJavaScriptareavailable.Therefore,youhavetoset

Page 107: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

someaspectsoftheelementwiththeattributesbeforeyouperformadrawingoperation.LookatthefollowingexamplewherethedrawingstylehasbeensetwiththefillStyleattribute,followedbytheactualdrawingofafilledrectanglewithfillRectfunction.

Page 108: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

canvas1.fillStyle=xxxxcanvas1.fillRect(xx,xx,xx,xx;EachandeveryitemintheAPIcomesprefixedwithitsowntypes;forinstance,floatforfloatingpointnumber.Someoftherepresentativetypesthatyouwillseeinthe

Page 109: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

specificationsbyW3Careasfollows:▪anyForattributes–Thisimpliesthatanattributecanbeofanykind.▪DOMStrings(MeaningDocumentObjectModelString)–Justaquotedtextstring,forourpurposes.▪float–Floatingpoint

Page 110: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

numberLetusnowlookatwhattheCanvasAPIenlistsforfunctionsandattributes.

Page 111: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

StylingTwoattributesareusedforsettingupthedrawingstyle,regardlessofwhetherthedrawingactionsaresupposedtofillthefigureornot:▪attributeanyfillStyle;//[defaultisblack]▪attributeanystrokeStyle;//[defaultisblack]

Page 112: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999
Page 113: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

SettingUpLineStylesThefollowingJavaScriptattributecanbeusedtosetthelinestyles:▪attributeDOMStringlineCap;//“butt”,“round”,“square”(default“butt”)▪attributeDOMStringlineJoin;//“miter”,“round”,“bevel”*(default

Page 114: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

“miter”)▪attributefloatlineWidth;//(default1)▪attributefloatmiterLimit;//(default10)

Page 115: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

CastingShadowsTheCanvasElementiscapableofaddingshadowstographicswiththefollowingattributes:▪attributefloatshadowBlur;//(default0)▪attributeDOMStringshadowColor;//(defaulttransparentblack)▪attributefloat

Page 116: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

shadowOffsetX;//(default0)▪attributefloatshadowOffsetY;//(default0)

Page 117: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

DrawingRectanglesThefollowingfunctionscanbeusedforrectangles:▪clearRect(floatx,floaty,floatw,floath);▪fillRect(floatx,floaty,floatw,floath);▪strokeRect(floatx,floaty,floatw,floath);

Page 118: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999
Page 119: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

DrawingComplexShapesTheCanvaselementallowsyoutodrawBeziercurves,arcs,andmanymorecomplexshapeswiththefollowingfunctions:▪arc(floatx,floaty,floatradius,floatstartAngle,floatendAngle,boolean

Page 120: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

anticlockwise);▪arcTo(floatx1,floaty1,floatx2,floaty2,floatradius);▪beginPath();▪bezierCurveTo(floatcp1x,floatcp1y,floatcp2x,floatcp2y,floatx,floaty);▪clip();▪closePath();▪fill();

Page 121: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

▪lineTo(floatx,floaty);▪moveTo(floatx,floaty);▪quadraticCurveTo(floatcpx,floatcpy,floatx,floaty);▪rect(floatx,floaty,floatw,floath);▪stroke();▪booleanisPointInPath(floatx,floaty);

Page 122: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999
Page 123: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

DrawingTextTextcanalsobewrittenwithinaCanvasbyutilizingthefollowingattributesandfunctions:▪attributeDOMStringfont;//(default10pxsans-serif)▪attributeDOMStringtextAlign;//“start”,“end”,“left”,“right”,“center”

Page 124: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

(default:“start”)▪attributeDOMStringtextBaseline;//“top”,“hanging”,“middle”,“alphabetic”,“ideographic”,“bottom”(default:“alphabetic”)▪fillText(DOMStringtext,floatx,floaty,optionalfloatmaxWidth);▪TextMetricsmeasureText(DOMStringtext);

Page 125: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

▪strokeText(DOMStringtext,floatx,floaty,optionalfloatmaxWidth);

Page 126: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

DrawingImagesImagescanbedrawnbythefollowingfunctions:▪drawImage(HTMLImageElementimage,floatdx,floatdy,optionalfloatdw,floatdh);▪drawImage(HTMLImageElementimage,floatsx,floatsy,floatsw,floatsh,floatdx,floatdy,floatdw,floatdh);

Page 127: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

▪drawImage(HTMLCanvasElementimage,floatdx,floatdy,optionalfloatdw,floatdh);▪drawImage(HTMLCanvasElementimage,floatsx,floatsy,floatsw,floatsh,floatdx,floatdy,floatdw,floatdh);▪drawImage(HTMLVideoElementimage,floatdx,floatdy,optionalfloatdw,float

Page 128: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

dh);▪drawImage(HTMLVideoElementimage,floatsx,floatsy,floatsw,floatsh,floatdx,floatdy,floatdw,floatdh);

Page 129: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

UsingTransformationsYoucaneasilyrotate,scale,ortranslategraphicsthroughthefollowingfunctions:▪rotate(floatangle);▪scale(floatx,floaty);▪translate(floatx,floaty);

Thiswasageneraloverview

Page 130: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

oftheCanvasAPI.Formoredetails,youcanrefertothelinkprovidedabove.

Page 131: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

GettingStartedWithCanvasItisnowtimetogetstartedwiththeCanvaselementandlearnhowyoucancreateone.Togetstarted,followthestepbystepguidelinesgivenbelow:

1. Usingatexteditor,createacanvas.html

Page 132: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

file.2. Enterthecodegiven

belowtocreateacanvaselementandtoset-uptheJavaScript.NotethatwewilluseJavaScriptinafunctionthatwehavenamedloader,whichrunsrightafterthe

Page 133: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Canvaselementloadscompletely.

<!DOCTYPEhtml><html><head><title>CanvasExample</title><scripttype=”text/javascript”>functionloader(){..

Page 134: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

.</script></head><bodyonload=”loader()”><h1>CanvasExample</h1><canvasid=”canvas”width=”600” height=”500”></canvas></body></html>

Page 135: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

3. AddJavaScriptgiven

belowtocreateanobjectthatcorrespondstotheCanvas.ThisobjectwillbeusedtoaccesstheCanvaselement.

<!DOCTYPEhtml><html><head>

Page 136: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<title>CanvasExample</title><scripttype=”text/javascript”>functionloader(){varcanvas=document.getElementById(‘canvas’);varcanvas1=canvas.getContext(‘2d’);...</script></head>

Page 137: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<bodyonload=”loader()”><h1>CanvasExample</h1><canvasid=”canvas”width=”600” height=”500”></canvas></body></html>

4. Savethecanvas.htmlfile.Ensurethatthiscodehasbeensavedin

Page 138: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

textformat.IfyouareusingWordPad,thedefaultformatisRTFwhichdoesnotworkwithwebbrowsers.

OnceyouhavecreatedaCanvasandimplementedtheassociatedJavaScript,youcanusetheappropriatefunctionsfordrawing

Page 139: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

rectangles,complexshapes,images,andmanyotherthings.

Page 140: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

SummaryTheCanvaselementiscapableofdrawinglines,arcs,images,complexshapes,text,andmuchmore.Aspecialapplicationprogramminginterface(API)hasbeencreatedbyW3Cforthisnewcanvaselement.Itspecifiesthenamesofall

Page 141: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

built-infunctionsandhowtheycanbeused.Twoattributesareusedforsettingupthedrawingstyle,regardlessofwhetherthedrawingactionsaresupposedtofillthefigureornot.

Page 142: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Chapter3:DraggingAndDroppingInthischapter,youwilllearnabout:

•Draganddrop•Startingadraganddropexample

Page 143: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

•Stylingtargetanddraggableelements

DraganddropoperationsaresupportedinHTML5.Youcaneasilymovetextandelementsaroundthewindowofthebrowserusingamouse,oranytypeofpointingdevicethatyoumayhave.

Page 144: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Thisfunctionalityisextremelyusefulandcanbeusedforavarietyofpurposes.Forinstance,itcanallowuserstodraganddropitemsintoashoppingcart,orallowthemtocustomizethingsontheirhomepage.

Page 145: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

DragAndDropThedraganddropfunctionalityrequiresthefollowingelementattributes:▪draggable▪ondragenter▪ondragover▪ondrop▪ondragstart▪ondragend

Page 146: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

ThefollowingbrowserssupportdragginganddroppingelementofHTML5:Firefox,Safari,Chrome,Opera.JustlikeotherelementsofHTML5,thisoneisalsodependentonJavaScript.Yousimplyconnectan‘on’attribute(suchasondragstart)

Page 147: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

toafunctionofJavaScriptwhichwouldthentakeplaceassoonastheuserstartstodraganelement:ondragstart=“returnstart(event)”;

DragAndDropAPIYoucanlearnallaboutthedraganddropspecifications

Page 148: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

athttp://dev.w3.org/html5/spec/dnd.htmlHowever,thepurposeofthisbookistogetyouacquaintedwiththemostimportantaspectsofHTML5.FromthepointofviewofHTML,thefollowingattributessupportdrag-and-drop:

Page 149: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

▪draggable▪ondragenter▪ondragover▪ondrop▪ondragstart▪ondragend

TheDraggableAttributeYoucaneasilycreatea

Page 150: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

draggableelementbysettingitsattributetotrueinthefollowingmanner:<divid=”draggable3”draggable=”true”></div>Thiscodeinformsthewebbrowserthataparticularelementcanbedragged.

Page 151: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

However,youalsoneedtoconnectthemtoaJavaScriptfunctiontomakeitfullywork.

TheOnDragEnterAttributeDragentereventstakeplacewheneverauserdragsadraggableelement.Thiscan

Page 152: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

beconnectedtoaJavaScripthandlerfunctioninthefollowingway:<divid=”target1”ondragenter=”returnenter(event)”...Notethattheeventoccursin

Page 153: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

droptargetsandnotinthedraggableelements.

TheOnDragOverAttributeThiseventoccurswithinadroptargetwheneverauserdragsadraggableelementoverit.ThiseventisconnectedtoaJavaScript

Page 154: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

handlerinthefollowingmanner:<divid=”target1”ondragenter=”returnenter(event)”ondragover=”returnover(event)”...

Page 155: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Theeventoccursindroptargets.

TheOnDropAttributeDropeventsoccurinthedroptargetwhenusersdropanelementontothespecifiedtarget.Thiseventis

Page 156: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

connectedtoaJavaScriptfunctionhandlersinthefollowingway:<divid=”target1” ondragenter=”returnenter(event)” ondragover=”returnover(event)” ondrop=”returndrop(event)”>Thiseventtendstooccurin

Page 157: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

droptargets.Donotforgetthatitisondrop,andnotondragdrop.

TheOnDragStartAttributeThiseventtakesplacewithindraggableelementswheneverauserstartstodragthem.Thiseventcanbeconnected

Page 158: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

toJavaScriptfunctionhandlersinthefollowingway:<divid=”draggable1”draggable=”true” ondragstart=”returnstart(event)” ...Theondragstarteventoccurs

Page 159: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

onlyindraggableelements.

TheOnDragEndAttributeWheneverusersstopdraggingdraggableelements,thiseventoccurs.YoucanconnectthiseventtotheJavaScriptfunctionhandlerslikethis:

Page 160: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<divid=”draggable1”draggable=”true” ondragstart=”returnstart(event)” ondragend=”returnend(event)”>1...

Page 161: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

StartingADragAndDropExampleThefollowingstepbystepguidelineswillhelpyoutoputthedraganddropelementtowork.

1. Createafilecalleddraganddrop.htmlusinganytexteditor.

2. Inputthefollowing

Page 162: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

codetoconstructthreetargetsonwhichthedraggableelementscanbedropped.Noteherethatthe<div>elementsarebeingusedfortargetsandthatthedraganddropeventswillbeconnectedto

Page 163: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

JavaScriptfunctions.

<!DOCTYPEHTML><html><head><title>DragandDropExample</title></head><body><h1>DragandDropExample</h1><divid=”target1”

Page 164: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

ondragenter=”returnenter(event)” ondragover=”returnover(event)” ondrop=”returndrop(event)”></div><divid=”target2” ondragenter=”returnenter(event)” ondragover=”returnover(event)” ondrop=”returndrop(event)”></div><divid=”target3” ondragenter=”returnenter(event)” ondragover=”returnover(event)”

Page 165: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

ondrop=”returndrop(event)”></div></body></html>

3. Nowaddthecodebelowtocreatethreedraggable<div>elements.

<!DOCTYPEHTML><html><head>

Page 166: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<title>DragandDropExample</title></head><body><h1>DragandDropExample</h1><divid=”target1” ondragenter=”returnenter(event)” ondragover=”returnover(event)” ondrop=”returndrop(event)”><divid=”draggable1”draggable=”true” ondragstart=”returnstart(event)”

Page 167: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

ondragend=”returnend(event)”>1</div><divid=”draggable2”draggable=”true” ondragstart=”returnstart(event)” ondragend=”returnend(event)”>2</div><divid=”draggable3”draggable=”true” ondragstart=”returnstart(event)” ondragend=”returnend(event)”>3</div></div>

Page 168: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<divid=”target2” ondragenter=”returnenter(event)” ondragover=”returnover(event)” ondrop=”returndrop(event)”></div><divid=”target3” ondragenter=”returnenter(event)” ondragover=”returnover(event)” ondrop=”returndrop(event)”></div></body></html>

Page 169: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

4. Savethefile,ensuringthatyousaveitintextformat.

Nowthatwehavestartedourexamplecontainingthreetargetsandthesamenumberofdraggableelements–allofthesearecurrentlyinvisible.Wewillnowstylethemnext.

Page 170: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999
Page 171: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

StylingTargetAndDraggableElementsWewillnowmakevisiblethe<div>elementsfordraggablesandtargets.Thetargetswouldbestyledincyan,andthedraggablesinorange.Followthestepsbelowtodothat:

Page 172: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

1. Openthefile

draganddrop.htmlusingyourfavoritetexteditor.

2. Addthecodegivenbelowtostylethetargetanddraggable<div>elements.

<!DOCTYPEHTML><html><head>

Page 173: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<title>DragandDropExample</title><styletype=”text/css”>#target1,#target2,#target3{float:left;width:250px;height:250px;padding:10px;margin:10px;}#draggable1,#draggable2,#draggable3{width:75px;height:70px;padding:5px;

Page 174: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

margin:5px;}#target1{background-color:cyan;}#target2{background-color:cyan;}#target3{background-color:cyan;}#draggable1{background-color:orange;}#draggable2{background-color:orange;}#draggable3{background-color:orange;}</style></head>

Page 175: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<body><h1>DragandDropExample</h1><divid=”target1” ondragenter=”returnenter(event)” ondragover=”returnover(event)” ondrop=”returndrop(event)”><divid=”draggable1”draggable=”true” ondragstart=”returnstart(event)” ondragend=”returnend(event)”>1</div><divid=”draggable2”draggable=”true”

Page 176: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

ondragstart=”returnstart(event)” ondragend=”returnend(event)”>2</div><divid=”draggable3”draggable=”true” ondragstart=”returnstart(event)” ondragend=”returnend(event)”>3</div></div><divid=”target2” ondragenter=”returnenter(event)” ondragover=”returnover(event)” ondrop=”returndrop(event)”>

Page 177: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

</div><divid=”target3” ondragenter=”returnenter(event)” ondragover=”returnover(event)” ondrop=”returndrop(event)”></div></body></html>

3. Savethefile.Nowyouwillbeabletosee

Page 178: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

draggablesaswellastargets.

Page 179: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

SummaryThedraganddropfunctionalityrequiresthefollowingelementattributes:draggableondragenterondragoverondropondragstart

Page 180: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

ondragendThefollowingbrowserssupportdragginganddroppingelementofHTML5:Firefox,Safari,Chrome,Opera.Thetargetanddraggableelementscanbestyledeasily.

Page 181: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Chapter4:WebFormControlsInthischapter,youwilllearnaboutwebformcontrols,including:

•Introductiontowebformcontrols•Webformsexample•Createadefaultcontrol

Page 182: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

HTMLhasalwaysofferedsupportforformcontrolsthroughtheuseof<input>element.Thisincludestextboxes:<inputname=”text”type=”text”>

Page 183: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Andradiobuttons:<inputname=”radio”type=”radio”>Suchcontrolscanbecreatedusingthe<input>elementalongwiththetypeofattributesettothetypeofcontrolyouwishtohave(radiobuttons,checkboxes,textfields).Youwillhaveto

Page 184: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

setthenameattributetothenameofcontrolbecauseyouwillneedtoreferenceitinthecode.HTML5increasesthevarietyofformcontrolsthatareavailabletothedeveloper.Ithasaddednumerouscontrols,includingnumericrangecontrolanddate-timepicker.

Page 185: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Thefocusofthislessonwouldbetolearnaboutwhat’snewinHTML5webformcontrols.

Page 186: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

IntroductionToWebFormControlsAspreviouslymentioned,awebformcontrolcanbecreatedusing<input>element.Element:<input>RequiredAttributes:Youstatethewebformcontrolthatyouneedalongwithits

Page 187: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

typeattribute.SupportedBrowsers:OperaThefollowingwebcontrolsareofferedbyHTML5:Type

button

checkbox

color

date

datetime

Page 188: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

datetime-local

email

file

hidden

image

month

number

password

radio

Page 189: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

range

reset

search

submit

tel

text

time

url

week

Page 190: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999
Page 191: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

WebFormsExampleWewillnowusethenewHTML5controls.Followthestepsbelowtogetstarted:

1. Usingatexteditor,createwebform.html.

2. TocreateanHTMLtablethatwillholdthewebformcontrols,

Page 192: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

enterthefollowingcode.Also,youwillbeaddingaSubmitbutton.

<!DOCTYPEhtml><html><head><title>WebFormExample</title></head>

Page 193: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<body><h1>WebFormExample</h1><formmethod=”post”action=”webforms.php”><tableborder=”1”cellpadding=”5”>...<inputtype=”submit”value=”Submit”></form></body></html>

Page 194: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

3. Savewebform.html,ensuringthatyousaveitinatextformat.

Nowthatyouhavecreatedthepage,itistimetoaddafewwebformcontrols.

Page 195: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

CreateADefaultControlIfadeveloperdoesnotspecifythetypeofcontrol,atextfieldiscreatedbydefault,asshownbelow.

1. Openwebform.htmlusingyourfavoritetexteditor.

2. Addthecodegiven

Page 196: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

below,andmakesurethatyoudonotspecifyanyattribute.Payattentiontotheautofocusattribute;thiswillmakeablinkingcursorappearinthetextboxassoonasthepageloads.Also,theplaceholder

Page 197: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

attributewillenableyoutosetplaceholdertext.Thefollowingcodewillnotworkinanybrowserasofyet.

<!DOCTYPEhtml><html><head><title>WebFormExample</title></head>

Page 198: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<body><h1>WebFormExample</h1><formmethod=”post”action=”webforms.php”><tableborder=”1”cellpadding=”5”><tr><td>Default</td><td><inputname=”name” placeholder=”Enteryournickname”autofocus></td></tr>...<inputtype=”submit”value=”Submit”>

Page 199: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

</form></body></html>3. Savethefileintext

format.

URLControlExampleWhileyoucannowcreateasmanycontrolsasyouwant,

Page 200: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

hereisanexamplethatwillshowyouhowtocreateaURLcontrol:

1. Openwebform.htmlandaddthecodebelowtocreateaURLfield:

<!DOCTYPEhtml><html><head><title>WebFormExample

Page 201: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

</title></head><body><h1>WebFormExample</h1><formmethod=”post”action=”webforms.php”><tableborder=”1”cellpadding=”5”><tr><td>Default</td><td><inputname=”name” placeholder=”Enteryournickname”autofocus></td></tr><tr><td>URL</td><td><inputname=”url”

Page 202: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

type=”url”></td></tr>...<inputtype=”submit”value=”Submit”></form></body></html>

2. Savethefileintextformat.

Theabovecodewillmakethe

Page 203: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

browserformattextenteredbyyouintoaproperURL.Itwillshowanerrorifitcannotdoit.Youcancreateotherwebformcontrolsinasimilarmanner.

Page 204: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

SummaryHTML5increasesthevarietyofformcontrolsthatareavailabletothedeveloper.Awebformcontrolcanbecreatedusing<input>element.Ifadeveloperdoesnotspecifythetypeofcontrol,a

Page 205: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

textfieldiscreatedbydefault.

Page 206: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999
Page 207: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Chapter5:InlineEditingInthischapter,youwilllearnaboutinlineediting,including:

•Gettingtoknowinlineediting

Page 208: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

HTML5allowsyoutomakeelementswhosecontentcanbeeasilyeditedbyusers;infact,thewholedocumentcanbeeditedwithmuchease.Bythis,wedonotrefertotextfields.Youcanmakeallkindsofelementseditable,including<div>elements.Inthissection,wewill

Page 209: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

attempttocreateaneditable<div>elementwhichwouldallowausertoeditit.Assoonasauserwillclickit,atext-insertioncaretwillappear,allowingtheusertoentertext.

Page 210: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

GettingToKnowInlineEditingThefollowingthreeattributescanbeusedwithinlineediting:•designmode–makesspecificHTMLelementseditable•contenteditable–makestheentiredocumenteditable

Page 211: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

•spellcheck–enablesspellchecking

contenteditableSupportedby:InternetExplorer,Chrome,Opera,Safari,FirefoxThecontenteditableattributecanbeusedinHTML5tomakecertainelementseditable.Therearethree

Page 212: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

settingsforthisattribute:•True–makescontentofelementeditable•False-makescontentofelementnoteditable•Inherit-makesattributethesameastheparentoftheelement

Inordertoallowausertoeditthe<div>element,wewillsetcontenteditabletotrue.

Page 213: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

ExampleInthisexample,wewillworkwiththecontenteditableattributetogetherwitha<div>elementtoenableuserstoentertextinthe<div>element.

1. Createafilecallededit-div.htmlinatexteditorofyourchoice.

2. Enterthiscodeinto

Page 214: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

thefile:<!DOCTYPEhtml><html><head><title>Editable&lt;div&gt;Element</title></head><body><h1>Editable&lt;div&gt;Element</h1>..

Page 215: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

.</body></html>

3. Tocreatea<div>

element,andtosetitscontenteditableattributetotrue,enterthefollowingcode:

<!DOCTYPEhtml>

Page 216: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<html><head><title>Editable&lt;div&gt;Element</title></head><body><h1>Editable&lt;div&gt;Element</h1><divid=”div”style=’border:solidblack;height:300px;width:400px’ contenteditable=”true”></div></body>

Page 217: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

</html>

4. Savethefileastext

andopentheHTMLdocumenttoseethecodeinaction.

designmodeSupportedby:InternetExplorer,Chrome,Opera,

Page 218: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Safari,FirefoxThisisanattributeofanentiredocumentandmakesthewholedocumenteditable.Therearetwosettingsofthisattribute:•On–turnsonthedesignmode,therebyallowingeditingofthewholedocument•Off–turnsoffthe

Page 219: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

designmode,therebypreventingeditingofthewholedocument

Ifyouwanttomakeyourdocumenteditable,youwillhavetosetthedesignmodeattributeto‘on’.

Page 220: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

ExampleTomakethewholedocumenteditable,wewilladdthedesignmodeattributewitha<iframe>floatingframe.Therefore,insteadofmakingjustthe<div>elementeditable,wewillmaketheentirepagecontainedinthe<frame>editable.

Page 221: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Here’showyoucangetstarted:

1. Createanedit-frame.htmlpageusingatexteditorofyourchoice.

2. Tocreatethe<iframe>andthisexample,enterthecodegivenbelow:

<!DOCTYPEhtml><html>

Page 222: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<head><title>Editable&lt;iframe&gt;</title></head><bodyonload=”loader()”><h1>Editable&lt;iframe&gt;</h1><iframeid=”content”style=’border:solidblack;height:300px;width:400px’ src=”about:blank”></iframe></body></html>

Page 223: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

3. Toturnonthe

designmodeattribute,enteraddthistothefile:

<!DOCTYPEhtml><html><head><title>Editable&lt;iframe&gt;</title><scripttype=”text/javascript”>

Page 224: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

variframe;functionloader(){iframe=document.getElementById(“content”);iframe.contentDocument.designMode=“on”;}..window.addEventListener(“loader”,onload,false);</script></head>

Page 225: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<bodyonload=”loader()”><h1>Editable&lt;iframe&gt;</h1><iframeid=”content”style=’border:solidblack;height:300px;width:400px’ src=”about:blank”></iframe></body></html>Savethefileintextformat.Inthisexample,wecreatedan

Page 226: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<iframe>andturneditsdesignmodeattributetoon.AddingButtonsYoucanaddbuttonsinthefollowingway:

1. Opentheedit-frame.htmlfileinatexteditor

2. Toaddbuttons,addthecodegivenbelow:

Page 227: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<!DOCTYPEhtml><html><head><title>Editable&lt;iframe&gt;</title><scripttype=”text/javascript”>variframe;functionloader(){iframe=

Page 228: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

document.getElementById(“content”);iframe.contentDocument.designMode=“on”;}functionshowSource(){varcontent=iframe.contentDocument.body.innerHTML;content.replace(/</g,‘&lt;’);content.replace(/>/g,‘&gt;’);alert(content);}

Page 229: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

functioncreateLink(){varurl=prompt(“EnterURL:”,“http://”);if(url)iframe.contentDocument.execCommand(“createlink”,false,url);}window.addEventListener(“loader”,onload,false);</script></head><bodyonload=”loader()”>

Page 230: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<h1>Editable&lt;iframe&gt;</h1><div><inputtype=”button”value=”Bold”onclick= “iframe.contentDocument.execCommand(‘bold’,false,null);”><inputtype=”button”value=”Italic” onclick=”iframe.contentDocument.execCommand(‘italic’,false,null);”><inputtype=”button”value=”Underline” onclick=”iframe.contentDocument.execCommand(‘underline’,false,null);”><inputtype=”button”value=”AddLink” onclick=”createLink();”><inputtype=”button”value=”DisplaySource”

Page 231: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

onclick=”showSource();”></div><br><iframeid=”content”style=’border:solidblack;height:300px;width:400px’ src=”about:blank”></iframe></body></html>3. Savethefile,making

surethatitisnotinanyformatotherthan

Page 232: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

text.Thisexampleworksinthesamewayasthepreviousone(edit-div.html)withtheonlyexceptionbeingtheuser’sabilitytoeditthewholedocumentcontainedinthe<iframe>.

spellcheck

Page 233: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Supportedby:FirefoxWheneditingthecontentofaspecificelement,suchas<div>element,thewebbrowsercanallowyoutospellcheckyourcontent.Therearetwovaluesofthespellcheckattribute:•True–turnsonspellchecking•False–turnsoff

Page 234: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

spellcheckingExampleAsofnow,onlyFirefoxsupportsthespellcheckingattributeofHTML5.IfFirefox,itisonbydefault.YouwillseethatanymisspelledwordsareautomaticallyunderlinedinFirefox,andcanbecorrected

Page 235: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

byright-clickingthewordandchoosingthecorrectwordfromthedrop-downlist.

Page 236: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

SummaryHTML5allowsyoutomakeelementswhosecontentcanbeeasilyeditedbyusers.Thefollowingthreeattributescanbeusedwithinlineediting:• designmode–makesspecificHTMLelementseditable

Page 237: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

• contenteditable–makestheentiredocumenteditable• spellcheck–enablesspellchecking

Page 238: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Chapter6:WorkingWithBrowserHistoryInthischapter,youwilllearnaboutworkingwithbrowserhistory,including:

•TheHistoryAPI

Page 239: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

•Pop.history.htmlexample

HTML5givesyougreatercontrolonthehistoryofthebrowser.ThisisachievedthroughtheHTMLhistoryofobject.Wewillcreateanexamplecalledpop-history.htmlinwhichtheuser

Page 240: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

canclickontheBackbuttontomoveonepageback.TheusercanalsoclickontheForwardbuttontomoveonepageforward.Whoalsohavetheabilitytoenteraspecificintegerinatextfield,clickGo,andthepagecanmoveaheadbythevalueoftheinteger.Onthe

Page 241: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

otherhand,anegativenumberwouldmovethepagebackwards.Togetthepushingandpoppingofdatatowork,youneedtouseabrowserthatsupportsthisfunction.Unfortunately,currentlytherearenobrowsersthatsupportthis.Nonetheless,itis

Page 242: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

importantthatyouunderstandhowthisworkssoyougetreadywellbeforethebrowsersdo.

Page 243: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

TheHistoryAPIThehistoryoptionisacomponentofthewindowobjectinwebbrowsers.Therefore,thiscanbereferredtoaswindow.historyobject.Herearethefunctionsandattributesthatcanbeusedtoassimilatewindow.historysupportwithinHTML5:

Page 244: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

•window.history.length;•window.history.go();•window.history.back();•window.history.forward();•window.history.pushState();•window.history.replaceState();•window.onpopstate

Letuslookattheseingreater

Page 245: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

detail:

window.history.lengthThisisanattributethatprovidesthenumberofentriesinabrowser’ssessionhistory.

window.history.back()Thisfunctionmovesonestep

Page 246: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

backinthebrowser’shistory.Itreturnsthewebbrowsertothepreviouswebpage.Ifnopreviouspageisavailable,thefunctionwilldonothing.

window.history.forward()Thisfunctionmovesonestepforwardinthewebbrowser’s

Page 247: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

history.ThismeansthatifyoumovedtoPageXfromPageY,andreturnedtoPageY.ThisfunctioncanbeexecutedtomoveforwardtoPageX.Ifnonextpageexistsinthehistory,thisfunctionwilldonothing.

Page 248: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

window.history.go([delta])Thisfunctionallowsyoutomovebackwardorforwardbyanynumberyoudesire.Notethatthedeltaargumentismentionedinbrackets;therefore,itisoptional.Ifnodeltaisprovided,thebrowserwillsimplyreloadthepagecurrentlybeingshown.

Page 249: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Thefunctionwoulddonothingifthedeltaisoutoftherangeofhistory.

window.history.pushState(data,title[,url])Thisisthefunctionthatenablesyoutopushdataintothehistoryofthebrowser.Dataistheargumentinthe

Page 250: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

objectthatstoresyourdata;titleisnamewhichyouwanttousetoreferenceyourdata,whereas,theurlisthatargumentthatenablesyoutolinkdatawithacertainpagesothatitcanbepoppedwhenthepagereloads.

Page 251: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

window.history.replaceState(data,title[,url])Thisfunctionreplacesacurrententryinhistoryifyougiveitthedata,title,andURL.

window.onpopstateThiseventtakesplacewhen

Page 252: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

statehistoryispoppedinordertobecomeaccessible.

Page 253: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

pop-history.htmlExampleLetusgetstartedwiththeexample.Followthestepsgivenbelow:

1. Justlikealways,createanHTMLfileusingatexteditorandnameitpop-history.html

2. Enterthecodegivenbelow:

Page 254: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<!DOCTYPEhtml><html><head><title>PagetoPageHistory</title></head><body><h1>PagetoPageHistory</h1>...

Page 255: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

</body></html>

3. Tocreate<div>

elementswhichwillbeusedtodisplaytheresultsinthisexample,addthefollowingcode:

<!DOCTYPEhtml><html>

Page 256: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<head><title>PagetoPageHistory</title></head><bodyonload=”loader()”><h1>PagetoPageHistory</h1><br><divid=”length”></div><br><divid=”state”></div><br></body>

Page 257: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

</html>

4. Savethefileintextformat.

Nowthatwehavecreatedthebasefile,letusnowgetittodosomethinginteresting.

AddABackButtonYoucan,usingthe

Page 258: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

window.history.back()function,enableausertonavigatebackwardsinthebrowser’shistory.Toaddthisbutton,followtheinstructionsgivenbelow:

1. Openpop-history.html2. Addthesubsequent

codetocreateabutton:

<!DOCTYPEhtml>

Page 259: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<html><head><title>PagetoPageHistory</title></head><bodyonload=”loader()”><h1>PagetoPageHistory</h1><inputtype=”button”value=”Back” onclick=”back();”>...

Page 260: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<br><divid=”length”></div><br><divid=”state”></div><br></body></html>

3. InordertomaketheBackbuttonactive,youhavetoconnectit

Page 261: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

tothefunctioncalledwindow.history.back().Here’showyoucandothat:

<!DOCTYPEhtml><html><head><title>PagetoPageHistory</title><scripttype=”text/javascript”>

Page 262: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

functionback(){window.history.back();}</script></head><bodyonload=”loader()”><h1>PagetoPageHistory</h1><inputtype=”button”value=”Back” onclick=”back();”><br><divid=”length”></div><br>

Page 263: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<divid=”state”></div><br></body></html>

4. Savethefileinplaintextformat.

NowtheBackbuttonwillappearinthedocumentandausercanclickittonavigatebackwards(onepage)inthe

Page 264: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

history.

AddAForwardButtonJustthewayyoucreatedabackbuttontoenableausertomovebackonepageinthebrowserhistory,youcanalsocreateaforwardbutton.Here’show:

1. Openpop-history.html

Page 265: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

usingyourfavoritetexteditor

2. TocreateaForwardbutton,addthiscode:

<!DOCTYPEhtml><html><head><title>PagetoPageHistory</title></head><bodyonload=”loader()”>

Page 266: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<h1>PagetoPageHistory</h1><inputtype=”button”value=”Back” onclick=”back();”><inputtype=”button”value=”Forward” onclick=”forward();”><br>...<br><divid=”length”></div><br><divid=”state”></div><br>

Page 267: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

</body></html>

3. Toactivatethe

Forwardbutton,youwillhavetoconnectittothewindow.history.forward()function.

<!DOCTYPEhtml><html>

Page 268: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<head><title>PagetoPageHistory</title><scripttype=”text/javascript”>functionback(){window.history.back();}functionforward(){window.history.forward();}

Page 269: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

</script></head><bodyonload=”loader()”><h1>PagetoPageHistory</h1><inputtype=”button”value=”Back” onclick=”back();”><br><inputtype=”button”value=”Forward” onclick=”forward();”><br><divid=”length”></div><br><divid=”state”></div>

Page 270: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<br></body></html>

4. Savethefileintext

format.Nowtheuserwillbeabletonavigateonepageforwardinthehistory.

Page 271: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

AddAGoButtonYoucanevenletusersenterthenumberofpagesthattheywishtonavigateto,eitherbackwardsorforwards.ThismeansthattheywillhavetoenteranintegerintextfieldandclicktheGobutton,whichwouldutilizethewindow.history.go()function

Page 272: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

toachievethis.HereishowyoucanaddaGobutton:

1. Openpop-history.htmlinatexteditor.

2. AddthecodegivenbelowtocreateanewGobuttonalongwithatextfield.

<!DOCTYPEhtml><html><head>

Page 273: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<title>PagetoPageHistory</title></head><bodyonload=”loader()”><h1>PagetoPageHistory</h1><inputtype=”button”value=”Back” onclick=”back();”><inputtype=”button”value=”Forward” onclick=”forward();”><br>Pagestomoveby:<inputid=”amount” type=”text”>

Page 274: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<inputtype=”button”value=”Go”onclick=”go();”><br>...<br><divid=”length”></div><br><divid=”state”></div><br></body></html>

Page 275: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

3.Justlikebefore,youwillhavetoactivetheGobuttonbyconnectingittothefunctioncalledwindow.history.go().<!DOCTYPEhtml><html><head><title>PagetoPageHistory</title>

Page 276: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<scripttype=”text/javascript”>functionback(){window.history.back();}functionforward(){window.history.forward();}functiongo(){varamount=document.getElementById(“amount”).value;

Page 277: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

window.history.go(amount);}</script></head><bodyonload=”loader()”><h1>PagetoPageHistory</h1><inputtype=”button”value=”Back” onclick=”back();”><br><inputtype=”button”value=”Forward” onclick=”forward();”><br><divid=”length”></div>

Page 278: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<br><divid=”state”></div><br>Pagestomoveby:<inputid=”amount” type=”text”><inputtype=”button”value=”Go”onclick=”go();”><br></body></html>

4. Savethepop-history.htmlfilein

Page 279: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

plaintextformat.NowtheuserwillbeabletoenteracertainnumberinthetextfieldandclicktheGobuttontonavigateforwardsorbackwards.Anumberwithaminussignwouldnavigatebackwards,whereasapositivenumberwouldmovethepageforward.(e.g.-2for

Page 280: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

twopagesbackwardsand2fortwopagesforwards)

Page 281: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

SummaryHTML5givesyougreatercontrolonthehistoryofthebrowserthroughtheHTMLhistoryofobject.Thehistoryoptionisacomponentofthewindowobjectinwebbrowsersandcanbereferredtoaswindow.historyobject.

Page 282: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

NewElementsInHTML5HTML5comesequippedwithanumberofnewelements.Theyareasfollows:

•<article>

Page 283: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

•<aside>•<audio>•<canvas>•<command>•<datalist>•<details>•<embed>•<figcaption>•<figure>•<footer>•<header>•<hgroup>•<keygen>

Page 284: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Tolearnmoreabouttheseelements,youcanvisitthefollowingpageatW3C’swebsite:www.w3.org/TR/html5/spec.html#auto-toc-8Also,youshouldnotethatthefollowingelementshavebeenremovedinthelatestversionofhyper-textmarkup

Page 285: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

language:

•<acronym>•<applet>•<basefont>•<big>•<center>•<dir>•<font>•<frame>

Page 286: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

WhereToGoFromHereThepurposeofthisbookwastogetyoustartedwiththebasicsofHTML5,andperhapsinstillaninterestforthisverypowerfulscriptinglanguage.Ourprimaryfocus

Page 287: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

wastoshedsomelightonwhatcanbedoneinHTML5;andasyoumayhaveseenandunderstood,HTMListhelanguageoftheWeb.Whileitcanbeintimidatingformanytolearnanewlanguage,whenitcomestoHTML,therearemany

Page 288: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

reasonswhyyoushouldreallyconsiderlearningHTML.Beforewediscusswhy,let’slookatwhatyoucandowithHTML.ThewebismadeupofHTML.Period.Thismeansthatyourpossibilitiesare

Page 289: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

endlesswhenitcomestowebdesign.WhileyoumayalsowishtolearnJavaScriptandCSStoenhanceyourwebpages,thecoreremainstobeHTML!Also,withsomanyWYSIWYGwebpageeditorsoutthere,manywonderwhy

Page 290: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

theyneedtolearncodinginthefirstplace.However,thisisthewrongapproach.Therearemanyinstanceswhereyouwillhavetomanuallyovercomeerrorsbygoingthroughthecode–soitalwayshelpstohaveathoroughunderstandingofthislanguage.

Page 291: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

IfyouwishtobuilduponyourfoundationofHTML,youmaywishtotakeonsomeadvancedcoursesthatwillunleashandhelpyouunderstandthepowerofHTMLwhichcanbeextremelyusefulinyourcareerorhobby!

Page 292: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Goodluck!

Page 293: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

ThankYouFor

ReadingThisBook.YourFirst$1000BonusReportClickHereForInstantAccess

Page 294: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999
Page 295: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

DISCLAIMERCopyright2014©AllRightsReservedNopartofthispublicationmaybereproducedinanyformorbyanymeans,includingprinting,scanning,

Page 296: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

photocopying,orotherwisewithoutthepriorwrittenpermissionofthecopyrightholder.TheAuthorhasstrivedineverywaytobeasaccurateandcompleteaspossibleinthecreationofthisbook,notwithstandingthefactthat

Page 297: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

hedoesnotwarrantorrepresentatanytimethatthecontentswithinthebookareaccurateduetotherapidlychangingnatureofthesubject.Whileallattemptshavebeenmadetoverifyeachandeverypieceofinformationprovided

Page 298: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

inthispublication,theAuthorassumesnoresponsibilityforanyerrors,omissions,orcontraryinterpretationofthesubjectmatterherein.

Page 299: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

IntroductionToCourse“Thefirst90%ofthecodeaccountsforthefirst90%ofthedevelopmenttime.Theremaining10%ofthecodeaccountsfortheother90%ofthedevelopmenttime.”–Tom

Page 300: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

CargillHiandwelcome.ThisbookisforanyoneinterestedinlearninghowtouseHTML.IpresumethatanyonewhohasdownloadedthisbookhasnoideaofwhatHTMLis,how,whyorwhentouseit.Everythinghasbeen

Page 301: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

laidoutforyousothatyoucanfamiliarizeyourselfwiththebasics.Then,youwilllearntoapplywhatyouhavelearnedbymakingaHelloWorldappandawebpageusingtheHTMLtext.IhaveattachedcolorfulscreenshotsandimagestoillustratewhatI

Page 302: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

havewritten.IhopeyouenjoyreadingthisbookasmuchasIenjoyedwritingitforyou.Thankyou,fordownloadingthisbookinadvance.

Page 303: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Chapter1:AnIntroductionToHTML“Acomputerletsyoumakemoremistakesfasterthananyotherinventioninhuman

Page 304: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

history,withthepossibleexceptionsofhandgunsandtequila.”–MitchRatcliffe

Page 305: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

WhatIsHTML?HTMListheabbreviatedforHyperTextMarkupLanguage.Thistextisusedtodevelopwebpages.HTMLelementsandtagsareusedbydeveloperssothatthewebbrowsercanreadthewebpageandinterpretthecontent

Page 306: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

ofthewebpagethewayitismeanttobeinterpreted.HTMLtextsareusedbywebpagedevelopersandappdevelopersforcodingandprogrammingpurposes.

Page 307: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

UtilityOfHTMLTextsTounderstandthisyoufirstneedtolookatthecomponentsoftheweb.TheWebBrowserInternetExplorerandGoogleChromeareexamplesofweb

Page 308: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

browsers.ToaccessawebsiteorwebpageyouhavetouseaWebBrowser.WebPagesWhenyoutypethenameofadomaininthewebsiteaddressbaryourwebbrowseristoldtoopenthatspecificpage.So,

Page 309: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

ifyouweretotypeinwww.Yahoo.comyourwebbrowserwouldtakeyoutotheYahoohomepage.

Theaddressbar

Page 310: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

TheWorldWideWebisquitecomplex.Itmightnotseemthatwaytosomeonewhohasnothingtodowithwebdevelopmentbecausealltheyneedtodoistotypeinthedomain,hit “ Enter ”andthen,reviewthewebpagefromanothercountryorcontinent.

Page 311: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

HostingServersOnceawebdeveloperhasmadeawebsiteahostingserverhastobeusedsothatthewebpagecanbeaccessedbyanyoneusingtheinternet.Versions

Page 312: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Withtechnologicaladvancementsitisimportanttorevise,alterand/orupdatethewaytheHTMLfunctions.Differentsoftware,likeAndroidortheiOS,isupdatedonayearlybases.Thisisdonetoremovebugsandfixanyerrorsinthepreviousversionofthesame

Page 313: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

software.Similarly,theHTMLhasbeenupdatedtocorrectpreviousversionsofthemarkuplanguage.ThelatestversionoftheHTMLisHTML5whichwasmadetocorrectsyntaxerrorsincurrentwebdocuments.Thisversionalsointroducesapplicationprogramming

Page 314: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

interfacesforapplicationsthatruninwebbrowsers.

Page 315: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Chapter2:HTMLTags“Controllingcomplexityistheessenceofcomputer

programming”.BrianKernighan

Variousimagesaredepictedonawebpagewiththeaidof

Page 316: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

HTMLtexts.Thesetextsalsoenablewebsitedeveloperstocreatestructureddocuments.Theycancreatedifferentheadings,paragraphs,linksandothercontenttoo.ThepurposeofHTMLtextsisonlytodepictcontentandinformationdisplayedona

Page 317: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

webpage.HowthewebpageispresentedandbehavesiscontrolledbyCascadingStyleSheets(whichareusuallyreferredtoasCSStransitions).Wewilltalkabouttheselater.Forawebbrowsertointerpretthecontent,one

Page 318: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

needstowriteanHTMLtextinaparticularway.Thinkofitthisway:ifyouwantedtoexplainsomething(inwritingform),itwon ’ tmakesenseforyoutowriteoneword,wouldit?Youhavetowritemanywordstoformasentence.Thiswaythepersonreadingthesentence

Page 319: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

understandsthetextandyoucangetyourpointacross.Now,comparethiswithhowHTMLTextsfunction.TherearedifferenttagsinHTMLtexts.Tagsareusedtosetheaders,paragraphs,linebreaksandsuchlike.So,whenmakingawebpageyouneedtohaveanideaofhow

Page 320: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

youwouldwantthewebpagetolook.ItwouldbeeasierforyoutosettheHTMLtags,then.XMLsyntaxisusedforthistags.

Page 321: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

TypesOfHTMLTagsTherearetwotypesoftags: pairedtags and unpairedtags .Pairedtagsareplacedbetweentagsandcompaniontags.Here ’ sanexample<i>ThistextisinItalics</i>.

Page 322: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<i>istheopeningtagwhile</i>istheclosingtag.Youcantellwhichtagiswhichbecauseoftheirpositions.UnpairedtagsdonothavecompaniontagsandthisiswhytheyarealsoreferredtoasStand-Alonetags.<hr>isanexampleofsuchatag.Asyoucanseethereareno

Page 323: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

openingorclosingtags.

Page 324: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Purpose-BasedTagsEverytaghasitsownpurposeandthereareprimarilythreetypesoftagswheretheseareconcerned.

1.FormattingTags:thesetagsareusedsothatwebpagedeveloperscanmanage

Page 325: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

fontsortounderlinethetextandsuchlike.So,the<b>tagcanbeusedtomakeaword,sentenceortheentiretextbold.2.PageStructureTags:thesedonotaffecttheformatofthepageassuchbutthey

Page 326: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

enableonetohandlethestructureofthepage.Thehead,titleanddescriptionareexamplesofthesetags.3.ControlTags:Scriptandformtagsarepartofthesetags.

Image tags areusedtoembed

Page 327: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

imagesinastructureddocumentforawebpage.The <img> tagisusedtorefertoaparticularimage.ThetextinsidetheenclosedbracketsistheHTMLtag.

Page 328: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

BasicCodesForPageStructureCertaincodesareusedtocreatethePageStructure.TheseHTMLcodesdeterminewheretheHeader,Title,Bodyandothercontentsgo.Bearinmindthatonceyouaredonedevelopingthewebpage,youcannotsee

Page 329: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

thecodesunlessyouaccessittomakecertainchanges.So,ifyouweretovisitwww.Google.comyouwon ’ tbeabletoseetheHTMLcodes,forexample.Here ’ saplainandsimpleHTMLtemplate:

<metahttp-equiv="Content-Type"content="text/html;charset=windows-

Page 330: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

1252"><html><head><title>Pagetitlehere</title><METANAME="DESCRIPTION"CONTENT="HTMLpagestructurewithsamplecode"><METANAME="KEYWORDS"CONTENT="HTMLpage,structureofapage,BasicHTMLpage,Metatags"></head><body>Ourbodycontenthere

Page 331: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

</body></html>Asisvisible,thepagestructureiskeptbetweentheHTMLtags.Theheadgoesbetweenthe <head> and </head> tagswhilethebodygoesbetweenthe <body> and </body> tag.The

Page 332: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

tagswithouttheobliquelines(/)aretheopeningtagswhilethepartwiththeobliquelinesaretheendtags.Anythingthatawebdeveloperwouldwantreadersorvisitorstoreadisinsertedwithinthebodytag.

Page 333: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

TheHeadTagAnytextyouusetomaketheHeadwiththeHeadTagswillnotbevisibleonthebrowser.Webdevelopersalsoinsertmetatagsheresothatanyonelookingforcontentthatthewebpageofferscanfindthewebpagewithease.

Page 334: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

TitleTagsTheseappearinthetop-leftsideofthewindow.Importantkeywordsshouldbedisplayedheresoreadersgetanideaofwhatthewebpageisallabout.ThoughJavaScriptisnotrelevanttothissection,youshouldknowthatanyJavaScriptcodeinsertedin

Page 335: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

thetagisloadedandcanbeseenonthewebpage.

Page 336: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

BodyTagsThisiswherethe ‘ mainbody ’goes.Anycontentyouwantyourreaderstoreadwillbemadevisiblehere.Insertortypeanycontentyouwouldliketobedisplayedhere.Thepageisthen,closedwiththe </html> tag.

Page 337: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

HTMLElementsDifferenttagsareusedtocreateHTMLelementsjustlikedifferentwordsarecombinedtoformasentence.ThisishowHTMLelementsareusuallydepicted:<tagattribute1="value1"

attribute2="value2">content</tag>.

IftheHTMLisempty(asitis

Page 338: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

incaseofalinebreaktag),thisiswhatitwouldlooklike:<tagattribute1="value1"attribute2="value2">.

TagsareusedtonamethespecificHTMLelement.So,ifyouwanttocreateaheaderinadocument,thishowitwilllook:<h2>Headinglevel2</h2>.

Page 339: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

HTMLelementsstartwiththeuseofthestartingtagandendwiththeuseoftheendingtag.Thefirsttagislikethefirstletterofasentencewhiletheendingtagislikethefullstopofthesameelement.Oncethelasttagisaddedyourelementiscomplete.Thisisonlythecasewhere

Page 340: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

thereisothercontent.WhereStand-alonetagsareconcernedtherearenostartingorendingtags.Also,oneHTMLelementcanbeusedwithinanotherHTMLelement.ThesearecalledNestedHTMLElementsbecauseoneelementisliterallyplaced

Page 341: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

withinanother.Here’sanexample:

<!DOCTYPEhtml><html><head><title>NestedElementsExample</title></head><body><h1>Thisis<i>italic</i>heading</h1><p>Thisis<u>underlined</u>paragraph</p>

Page 342: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

</body></html>Youwillgetthefollowingresult:ThisisitalicheadingThisisunderlinedparagraphThetitleandheaderwerenestedwithinthebodyoftheHTMLtemplate.Thecontentwasitalicizedandunderlined

Page 343: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

onthesametemplate.Bydoingthiswebdeveloperscangetmoreworkdoneinashortertimeperiod.HTMLcodesandelementsareprettymuchthesamething.Programmersoftenusethetermsinterchangeably.

Page 344: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

UsingHTMLHeaderElementsTherearedifferentelementsfortheheader,body,frame,table,textformats,etc.InthissectionyouwillreadaboutHeaderelementssothatyoucanimplementthesewhendevelopingyourownwebsite.<head>:thisistheopening

Page 345: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

tagforanHTMLdocument.Youcanplaceothertagsinthistag.<title>...</title>:thistagwouldenableyoutonameyourdocumentanditisgenerallypreferredthatthetitlebe64characterslong(maximum).<basehref="url">:thebase

Page 346: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

URLofthedocumentcanbespecifiedwiththiselement.YoucanalsodereferenceURLs.<basehref="url"target="...">:inadditiontothefunctionsofthepreviouselement,thiselementcanalsobeusedsothatyoucanspecifythebasetargetframe

Page 347: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

thatalinkorlinkswoulddefaultto.<meta … >-enablesyoutoembedinformationintotheHTMLdocumentasifithasbeenembeddedbytheserver.<metahttp-equiv="refresh"content="N">:reloadsthepageafterNseconds.<metahttp-equiv="refresh"

Page 348: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

content="N"url="http://www.example.com>:anotherpagewouldberefreshedafterNseconds.<metahttp-equiv="expires"content="Tue,Sept201411:21:00GMT">:allowsyoutosetanexpirydateforcontentonthewebpage.Itwillthen,reloadafterthis

Page 349: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

date.<metahttp-equiv="keywords"content="keyword1,keyword2,...">:specifieskeywordsthatcanbeutilizedbyasearchengine.<metahttp-equiv="description"content="Ashortdescription

Page 350: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

ofthesite">:youcanbrieflydescribethepage.Thisisalsousedbythesearchengine.<styletype="text/css"href="URL"/>:theelementenablesyoutospecifytheCSSfilethatyouwouldusetodevelopthewebpage.<scripttype="text/scripttype"href="URL"/>:thisallows

Page 351: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

youtospecifyJavaScriptthatyoucanuseonyourwebpage.<noscript>...</noscript>:somebrowsersarenotabletosupportinlinescriptsandthiselementenablesyoutoenclosematerialthatyouwanttobedisplayedonsuchbrowsers.

Page 352: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

</head>:thisistheclosingtagfortheheaderelement.UsingBodyElements<body>...</body>:thisisusedtoenclosethebodyofthestructureddocument.<hn>...</hn>:youcanmanipulatethesizeoftheheadingbytyping1,6oranynumberbetweentwoinplace

Page 353: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

ofn.<basefontsize="n">:allowsyoutoset(whatyouwanttobe)thedefaultfontpropertiesforyouwebpage.<isindexattributes>:yourservermustbecapableofsupportingthiselement.Thiselementwilldisplayatextbox.Thetextboxisusedto

Page 354: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

indicatethatasearchableindexexistsonthewebpage.<imgsrc="URL"attributes>:youcanplaceaninlineimageonyourdocument.<mapattributes>...</map>:thisenablesyoutospecifycollectionsofhotspotsonanimagemap.Youcanalsousethe<area>tagtospecifythe

Page 355: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

hotspotsonthismap.<areaattributes>...</area>:thiswillenabletodefinethesizeandshapeofthesehotspotsonthemap.<marqueeattributes>...</marquee>:enablesyoutoplacescrollingtextonyourwebpage.<appletattributes>...

Page 356: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

</applet>:ifyouareusingabrowserthatcannotsupportJava,youcantypetextbetweenthetwotagssothatitcanbedisplayedbythebrowser.<embedattributes>...</embed>:youcanembedavideoorsoundfileintotheHTMLdocument.These

Page 357: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

wouldthen,beshownonyourwebpagebythebrowser.<ahref="...">...</a>:youcanusethistodisplayalinkforanotherwebsite/anchor.However,usingtheNAMEattributewouldenableyoutochangethetextorgraphicintoananchor.

Page 358: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<olattributes>...</ol>:textwrittenbetweenthesetagsandmarkedwith<li>willbedisplayedasanumberedlist.<ulattributes>...</ul>:ifyouweretomarktextbetweenthetagswith<li>,youcouldcreatealistwithbulletpoints.

Page 359: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

UsingFrameElements<framesetattributes>...</frameset>-Youcanusethesetagssodefineasetofframesthatyouwouldliketouseforyourpage.The<frame>and<noframes>tagsareinsertedhere.While

Page 360: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

the<frameset>tagisusedwithinthe<body>tag,itisalsopossibleforyoutoinsertthe<body>tagwithin<noframes>tagssothatthesecanbedisplayedbybrowsersthatarenotcapableofsupportingframes.<frameattributes/>-singleframeswithintheframeset

Page 361: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

canbedefinebythisattribute.<iframeattributes>...</iframe>-Thiscanbeusedinordertodefinefloatingframes.Youneednotinsertthisintheframeset.<noframes>...</noframes>-Thisisplacedwithinthe<frameset>.Materialplaced

Page 362: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

withinthetwotagsareshownonbrowsersthatarenotcapableofsupportingframe.Thetagsareusedprimarilyforolderbrowsersthatcannotdisplayframes.InsertingTableElements<tableattributes>...</table>-Thisattributeenablesyoutoinsertatablewithany

Page 363: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

numberofrows.<captionattributes>...</caption>-enablesyoutocaptionthetable.<trattributes>...</tr>-youcanusethistospecifyatablerow.Theattributecanalsobeusedinordertoenclosethetableheadingand/ortabledata.

Page 364: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<thattributes>...</th>-canbeusedtospecifythetableheading.<tdattributes>...</td>-canbeusedtospecifythetabledatacell.<colgroupattributes/>-canbeusedinordertospecifythepropertiesofvariouscolumns.Itisusuallyinserted

Page 365: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

rightafterthe<table>tag.<colattributes/>-thisismostlyusedwith<colgroup>tagtospecifythepropertiesofoneparticularcolumn.itoverridesattributesthathavebeenspecifiedinthe<colgroup>.Thistagcomesrightbeforethe<colattributes/>.

Page 366: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<tbody>...</tbody>-thesetagsareusedtoenclosethebodyofatable.Youneednotusethetagsunlessyoudecidetoinsertthe<thead>or<tfoot>tags.Thetagsareusedsoyoucansotherowsareseparatedfromtheheaderand/orfooterofthetable.<tfoot>...</tfoot>-thesetags

Page 367: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

areusedtoenclosetablerowsthatyouintendonusingasthefooter.Thetagisoptionalandwillcomeafter<tbody>.<thead>...</thead>-thisisusedtoenclosetablerowsthatwillbeusedfortheheader.Itistobeinsertedpriortotheopening<tbody>element.

Page 368: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999
Page 369: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

UsingFormElements<fromattributes>...</from>-Theelementsisusedtospecifyformsthatareusedinordertosenduserinputtoaserver.ThisisdoneinNAME/VALUEpairs.<inputattributes/>-Thisattributecanbeusedtomanagethecontrolorinput

Page 370: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

areaforaform.ItisthisformwhichtheNAME/VALUEpairisreturnedtotheserver.thiscouldbeCheckbox,text,Raidobox,reset,submit,password,hiddenandimage.<selectattributes>...</select>-Youcanusethistoinsertadropdownlistofvariousitemsthataredefinedbythe

Page 371: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<option>tags.Thetagsarethen,insertintheopeningandclosing<select>tag.<optionvalue="..."/>-Thiswouldenableyoutospecifyanitemthatbeseeninthedropdownlistandtheattributeisplacedinsidetheopeningandclosing<select>tags.Textfollowingthe

Page 372: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<option>tagisapparenttotheuser.<textareaattributes>...</textarea>-Amulti-linedtextentryboxcanbecreatedandanytextbetweenthetagscanbeusedasthedefaulttextstringthatarevisiblewhenthepageisloaded.<buttonattributes>...

Page 373: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

</button>-YoucaninsertpushbuttonsonaformthatissimiartopushbuttonsseenonWindowsandotherapplications.

Page 374: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

UsingTextFormattingElements<address>.....</address>-Thisisusedtoenclosethesignaturefileofthewriterofthepage.<acronym>.....</acronym>-Thisisusedtoindicatethatthereisanacronyminthetext.

Page 375: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<b>...</b>-Textwithinthesetagsareboldfaced.<big>...</big>-Thetext ’ ssizeisincreasedanditismadetolookbigger.<blink>.....</blink>-Textenclosedinthetagswillblinkcontinually.<blockquote>.....</blockquote>-Thisisusedso

Page 376: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

toencloselongquotes.Theleftandrightmarginswillbeindented.<br>-Insertsalinebreak.<center>.....</center>-Enclosedelementsareplacedinthemiddleofthedocument.<cite>.....</cite>-Thiscanbeusedtoenclosecitations.

Page 377: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Examplesthetitleofabook,articleorpaper.<code>.....</code>-Thesampleofthecodecanbeenclosebyplacingitbetweenthesetagsandthesizeofthetextisreduced,too.<comment>.....</comment>-Commentscanbeenclosed.Anytextinsidethetagswill

Page 378: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

notbereadifitdoesnotcontainHTMLcode.<del>.....</del>-Thisisusedtomarkthedocumenttextthatwasdeletedinpreviousversion.<dfn>.....</dfn>-Thisisusedtoencloseadefinition.So,anytextplacedinsidethetagsisformattedsoitcan

Page 379: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

looklikeadefinition.<div>...</div>-Thealignmentoftheenclosedtextcanbespecifiedwiththiselement.Itcanalsobeusedsoyoucandividethedocumentintosectionsthathavebeenaligneddifferently.<em>...</em>-Emphasisislaidonthetext.

Page 380: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<fontattributes>...</font>Thefontpropertiesaresetforthetextwithinthesetags.<fieldsetattributes>...</fieldset>-Youcangroupformfieldsthatarerelatedtoeachothersotheformiseasiertouseandread.<hrattributes/>-Thisisusedtomakeahorizontalline.

Page 381: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<i>...</i>-Thisisusedtoitalicizethetext.<ins>...</ins>-Thiscanbeusedifyouwouldliketomarkcertainpartsofadocumentthatwereaddedtothedocument'slastversion.<label>...</label>-Youcanlabelatag.<kbd>...</kbd>-Thisis

Page 382: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

usedtospecifytextthatneedstobeenteredatthekeyboard.Thetextisreducedsoitcanappeartobeboldandfixed-width.<pattributes>...</p>-Designatestheenclosedtextasaplainparagraph.<q>...</q>-functionsthesamewayasthe

Page 383: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<blockquote>tag.However,thisappliestoquotessectionthatdon'trequiretheinsertionofparagraphbreaks.<pre>.....</pre>-Thetextcanbedisplayedinfixed-widthtypeandyouwon ’ thavetocollapsespaces.<s>.....</s>-Usingtheelementwouldresultintext

Page 384: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

withalinerunningthroughit.The<strike>tagfunctionsthesameway.samp>...</samp>-Thesampleoutputfromanyformorprogramcanbeindicatedwiththiselement.Also,thetextisreducedsoitcanappearinsmallfont.<small>...</small>-The

Page 385: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

sizedoftheenclosedtextisreducedsothatitisasizesmaller.<spacerattributes>...</spacer>-BlocksofspacescanbeinsertintotheHTMLdocuments.<strong>...</strong>-Thiscanbeusedforstrongeremphasisonthetext.

Page 386: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<sub>...</sub>-Condensesthetextinsertedinbetweeninsubscript.<sup>...</sup>-Condensesthetextinsuperscript.<tt>...</tt>-Textstypedbetweenthesetagsareformattedintypewriterfont.<u>...</u>-Thisisusedtounderlinethetext.

Page 387: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<var>...</var>-Variablescanbespecifiedandthetextiscondensedinsmallfixed-widthtype.<wbr>-TextenclosedbyNOBRtagscanbewrappedifandwhenneedbe.Refertothislinkformoretags:http://htmldog.com/reference/htmltags/

Page 388: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999
Page 389: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

SummaryReadabouttagsandelements.Thischapterenlistsvarioustagsthatareusedfordifferentpurposes.GothroughthesesoyouarecapableofmakingyourownHTMLtemplate.

Page 390: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Questions1. Whataretagsandwhy

aretheyimportanttoHTML?

2. Whatareelements?3. Makeyourown

HTMLtemplate.

Page 391: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Chapter3:Formatting

“It'sokaytofigureoutmurdermysteries,butyoushouldn'tneedtofigureoutcode.Youshouldbeabletoreadit.”-SteveMcConnell

Whenmakingastructureddocumentwebdevelopers

Page 392: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

alsohavetoinsertHTMLelements,tagsandcodestoitalicize,underlineormakecertainpartsofthedocumentbold.Inordertoitalicizeanypartofthetextyouneedtotypeitbetween<i>(whichisthestartingtag)and</i>(theendingtag).

Page 393: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Lookatthefollowingexample:

<!DOCTYPEhtml><html><head><title>ItalicTextExample</title></head><body><p>Thefollowingwordusesa<i>italicized</i>typeface.</p>

Page 394: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

</body></html>Onceyoudothisyouwouldgetthisresult:Thefollowingwordusesaitalicizedtypeface.Youcouldusethistoitalicizeapartofthetext.Let ’ suseourownexample

Page 395: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

now.

<!DOCTYPEhtml><html><head><title>ItalicTextExample</title></head><body><p>Thefollowingwordusesa<i>italicized</i>typeface.</p></body></html>

Page 396: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Here ’ showthiswouldlook:

Mybirthdayisonthe25thofNovember,yes.So,anytextthatneedstobeitalicizedshouldgobetweenthe<i>and</i>tags.Now,ifyouwouldliketomakeaspecificpartofthetextbold,youwouldenterit

Page 397: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

between<b>(thestartingtag)and</b>(theclosing/endingtag).Here ’ stheHTMLtemplatetoshowyouhowthisworks:

<!DOCTYPEhtml><html><head><title>BoldTextExample</title>

Page 398: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

</head><body><p>Thefollowingwordusesa<b>bold</b>typeface.</p></body></html>Theresultwouldlooklikethis:Thefollowingwordusesaboldtypeface.Similarly,youcanalso

Page 399: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

controlthesizeofthetext.Ifyouwanttogoforlargertextstypeyourtextbetweenthe<big>and</big>tagsandchangethe<title>toLargerTextExample.Ontheotherhandifyouwanttoreducethesizeofyourtext,typeyourtextbetweenthe<small>and</small>tags

Page 400: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

andchangethe<title>toSmallTextExample.YoucanalsouseHTMLtextsinordertogroupvariouselementstogether.Forthisyouneedtousethe< div >and< span >elements.Here ’ sanexample:

<!DOCTYPEhtml>

Page 401: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<html><head><title>DivTagExample</title></head><body><divid="menu"align="middle"><ahref="/index.htm">HOME</a>|<ahref="/about/contact_us.htm">CONTACT</a>|<ahref="/about/index.htm">ABOUT</a></div><divid="content"align="left"bgcolor="white">

Page 402: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<h5>ContentArticles</h5><p>Actualcontentgoeshere.....</p></div></body></html>IfyouweretousetheHTMLelementsabove,thiswouldbetheresult:HOME|CONTACT|

Page 403: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

ABOUTContentArticlesActualcontentgoeshere.....Youcouldalsousethe<span>elementtogroupinlineelementstogether.Inlineelementsareelementsthatdonotbeginfromanewline.Here ’ stheHTMLtextthatwouldenableyouto

Page 404: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

groupinlineelementstogether:

<!DOCTYPEhtml><html><head><title>SpanTagExample</title></head><body><p>Thisistheexampleof<spanstyle="color:green">spantag</span>andthe<spanstyle="color:red">divtag</span>alongwithCSS</p>

Page 405: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

</body></html>

Thiswillproducethefollowingresult: ThisistheexampleofspantagandthedivtagalongwithCSS.AscanbeseenfromtheHTMLtext,youcandeterminethecolorofthe

Page 406: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

text,too.MostlythetagsareusedwithCSSstylesheets.ReadthefollowingwebsiteifyouwanttoknowmoreaboutHTMLformatting:http://www.tutorialspoint.com/html/html_formatting.htm

Page 407: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

SummaryHTMLformattingisimportant.Itenableswebpagedeveloperstoformatapageinacertainway.Thischapterteachesyouhowtousedifferentcodestomakestructureddocumentsboldorhowtoitalicizecertainpartsofthetext,too.

Page 408: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999
Page 409: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Questions1. Whatareinline

elements?2. Howdoyouintroduce

inlineelementsinyourcode?

Page 410: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Chapter4:AddingParagraphs“Goodcodeisitsownbestdocumentation.Asyou'reabouttoaddacomment,askyourself,"HowcanIimprovethecodesothatthiscomment

isn'tneeded?"

Page 411: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

SteveMcConnell

AddingparagraphstotheHTMLtextisn ’ tasdifficultasonewouldthinkittobe.Themaintagtousehereisasfollows:<p>.ThePiswrappedinbracketssothatthebrowsercaninterpretthecontentofthe

Page 412: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

webpage.Here ’ sanexampleofhowtheaforementionedtagisusedtocreateparagraphs:

<p>Thisisaparagraph</p><p>Thisisanotherparagraph</p>

Page 413: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

LineBreaksInsomeinstancesyoumightwanttoseparatethecontentoraddinanewparagraph.Forthisyouneedtousethe<br>tag.Here ’ showthiswouldlook:

<p>Thisis<br>apara<br>graphwithlinebreaks</p>

Page 414: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Chapter5:Attributes“Fromaprogrammer'spoint

ofview,theuserisaperipheralthattypeswhenyouissueareadrequest.”-

PeterWilliams

Youmightwanttocustomizehowyourtagsfunctionso

Page 415: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

thatyoucandisplayyourwebpage.Thiscouldbebecauseyouwanttohavemorecontroloverthewayyoudisplaycontentonyourwebpageorbecauseyouwanttomakeanapp,too.Theattributeisusedtomodifytheelementbyassigningavaluetoit.Thiswaythewebpage

Page 416: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

developercanmanipulatetheelementtochangeit.Onecanmakeattributesinsidetagswithstarttags.Thisisdonetocreatevarioussection,identifiersortopresentinformationinacertainway.Sometagsareusedsimplytobreakalineandsuchtagsaremostlyempty.Theseare

Page 417: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

emptytagsthataresimilartothestarttagandtheydonotutilizeendtags.Here ’ sanexampleofa linebreaktag :<br>.

Thereare3typesofattributes:simpleattributes,fragmentattributesanddynamicattributes.

Page 418: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

SimpleAttributesSimpleattributeshavethefollowingsyntax: attr="value".Thesecanbeseeninthestarttag.Youcanuse string constantsorexpressionlanguagetosetthisattribute.Here ’ sanexampleofhowstringconstantscanbeusedfor

Page 419: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

simpleattributes:<stringname="hello_world">Helloworld!</string>ThisspecificattributewasusedtodeterminethenameoftheHelloWorldapp.Consequentially,theapp ’ snameappearedtobeasfollows: “ HelloWorld! ”Jsp.attributeelementscanbe

Page 420: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

usedfortheseattributestoo.ThisenablesyoutochangethevaluesofvariousattributesinsidetheXMLbodyratherthandoingsoviatheXMLattributes.

Page 421: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

FragmentAttributesAtaghandlerusesfragmentsinordertocustomizecontentonthewebpage.Forthisyouneedtodeclarethe Fragment anddefinethevaluesfortheseattributes.Also,whenusingthe jsp:attribute elementrememberthatnoscripting

Page 422: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

elementscanbeincluded.Thesecanonlyincludestatictexts,customandstandardtags.Thismeansyoucannotincludecomments,directives,declarations,scriptletsorexpressions.Thesewillnotshowonthewebbrowser.

Page 423: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

DynamicAttributesThesearenotspecifiedintags.Thenamesoftheseattributesmightnotbeknownwhenthewebpageisstillbeingdeveloped.Here ’ sanexampleofatagthatdescribesmorethanoneattribute:

Page 424: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<colored:coloredcolor1="red"color2="yellow"color3="blue"/>Youcanreadaboutmoreattributeshere:http://www.tutorialspoint.com/html/html_attributes_reference.htm

Page 425: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999
Page 426: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

SummaryAttributescanbeusedtocustomizedifferenttags.Thischapterteachesyouaboutthe3basictypesofattributesandwhenthesecanbeusedtogiveeffectstotags.

Page 427: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Questions1. Whatareattributes?2. Whatdothesehaveto

dowithelements?3. Whyisitbeneficialfor

aprogrammertousetheJsp.attributeelement?

Page 428: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Chapter6:CreatingHTMLFrames“Alwayscodeasiftheguywhoendsupmaintainingyourcodewillbeaviolent

Page 429: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

psychopathwhoknowswhereyoulive.”-MartinGolding

Somewebdevelopersdividethebrowserintodifferentframes.ThismakesiteasierforthemtoloadseparateHTMLdocumentsatthesametime.LoadingHTMLdocumentscanbetime-consumingandinefficient.

Page 430: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

So,awindowisdividedintovariousframesmuchlikedividingasheetofpaperintocolumnsandrows.Mostpeoplearediscouragedfromusingframesbecause:

1. Frametechnologyisnotsupportedbyallbrowsers.

2. Differentscreen

Page 431: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

resolutionsareusedondifferentcomputers.Thismeansthatthewebpagewouldappeartobedifferentoneverycomputer.

3. Somedevicesaren’tbigenoughtobedividedintorowsandcolumns.

However,itisimportantto

Page 432: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

knowthebasicsabouttheseevenifyouchoosenottousethem.Whenmakingtheframereplacethe<body>tagwiththe<frameset>tag.Thistellsthecomputerhowtodividethescreen.The rows and cols attributes

Page 433: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

willbeusedwiththe<frameset>tag,too.The rows attributesdescribesthenumberofhorizontalframesthatwillbeusedwhilethe cols attributewilldescribethenumberofverticalframestobeintroduced.Thefollowingwillbeusedtomake3horizontalframes:

Page 434: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<!DOCTYPEhtml><html><head><title>HTMLFrames</title></head><framesetrows="10%,80%,10%"><framename="top"src="/html/top_frame.htm"/><framename="main"src="/html/main_frame.htm"/><framename="bottom"src="/html/bottom_frame.htm"/>

Page 435: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<noframes><body>Yourbrowserdoesnotsupportframes.</body></noframes></frameset></html>Thisiswhatthebrowserwouldlike:

Page 436: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Now,let ’ screateverticalrowscolumnsinstead:

Page 437: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<!DOCTYPEhtml><html><head><title>HTMLFrames</title></head><framesetcols="25%,50%,25%"><framename="left"src="/html/top_frame.htm"/><framename="center"src="/html/main_frame.htm"/><framename="right"src="/html/bottom_frame.htm"/><noframes>

Page 438: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<body>Yourbrowserdoesnotsupportframes.</body></noframes></frameset></html>Allyouneedtodoistoreplacethe rows attributewith cols instead.Here ’ s

Page 439: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

howthebrowserwilllooknow:

Let ’ slookattheutilityofvarious<frameset>tag

Page 440: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

attributes:

Page 441: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

ColsThisenablesyoutomanagethenumberandsizeofthecolumnsintheframeset.Thiscanbedonebyusingabsolutevalues.Thiscanbedonebysettingcolsto100,500,100.Youcanalsocontrolthewidthofthecolumnbyspecifyingthepercentageof

Page 442: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

thebrowserwindowyouwouldliketouseforeachcolumn.Thiscanbedonebysettingthevaluesto20%,60%,20%.Ifyouwouldpreferusingrelativewidths,insteadofpercentages,thiscanbedonetoo.Forthisyoucansetthecolsto"3*,2*,1*"

Page 443: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

or “ 4*,3*,1* ” .

Page 444: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

RowsYoucansetthisattributethesamewayyouweretaughttomanagethecolsattribute(above).Theonlydifferenceisthatwhilethecolsattributeenablesyoutohandlethesizeandnumberofcolumns,thisattributeenablesyoutocontrolthesizeandnumber

Page 445: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

ofrowsinstead.

Page 446: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

BorderThisattributespecifiesthewidthoftheborder.Ifyousetittozero,therewouldbenoborder.

Page 447: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

FrameborderYoucanusethisattributetodecideifthereshouldbe3dimensionalboardersbetweentheframes.Youcansetittozero(0)fornobordersorto1ifyouwouldliketoinsertsuchborders.

Page 448: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

FramespacingAdjustingthisattributesenablesyoutodecidethespaceyouwouldliketoputbetweentheframesintheframeset.Settingthisvalueto5meansyouwanttheframestobe5pixelsapartfromeachother.Nowlet’sconsiderthe

Page 449: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

attributesforthe<frame>tag:

Page 450: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

SrcThisattributeisusedinordertoinsertthefilenametobeloadedandmadevisibleontheframe.Intheexamplegivenabove,theURLsrc="/html/top_frame.htm"wasusedtonamethefirstrowandcolumnTopFrame.

Page 451: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

NameThisallowsyoutodeterminetheframethatadocumentshouldshowin.

Page 452: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

FrameborderThisallowsyoutodeterminewhetherthebordersofacertainframeshouldshow.However,thevalueoftheframeborderinthe<frameset>tagswillbeoverridden.Setit0ifyouifyoudon’twanttheborderstoshoworto1ifyouwant

Page 453: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

borderstoshow.

Page 454: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

MarginwidthThisattributecanbeusedtospecifyhowmuchspaceyouwouldliketoseebetweentheleftandrightsidesofaframe’sborders.

Page 455: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

MarginheightYoucanusethisattributetodecidehowmuchspaceyouwouldliketoseebetweenthetopandbottomofyourframe’sborders.Inotherwordsyoucancontroltheframe’slength.

Page 456: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

NoresizeThenoresizeattributepreventsusersfromchangingthevaluesoftheattributesshownabove.

Page 457: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

ScrollingThisattributecanbeusedtodisplayscrollbarsonthewebpage.

Page 458: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

LongdescWiththisattributeyoucanuselinksthatwouldtakeuserstoanotherpage.Somebrowsersdon’tsupportframesandinsuchinstancesinsertthe<body>elementwithinthe<noframes>elementinstead.Youcanalsoplacethe

Page 459: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

navigationbarsinoneframeandmainpagesinanother.Here ’ sanexample:

<!DOCTYPEhtml><html><head><title>HTMLTargetFrames</title></head><framesetcols="200,*"><framesrc="/html/menu.htm"name="menu_page"/>

Page 460: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<framesrc="/html/main.htm"name="main_page"/><noframes><body>Yourbrowserdoesnotsupportframes.</body></noframes></frameset></html>Whatthisdoesisthisit

Page 461: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

creates2columnsandtwoframes.Thenavigationmenubarwillbeplacedinthefirstframethatis200pixelswide.The menu.htm filewasinsertedtoimplementthis.Hereisthecontentforthisfile:

<!DOCTYPEhtml>

Page 462: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<html><bodybgcolor="#4a7d49"><ahref="http://www.google.com"target="main_page">Yahoo</a><br/><br/><ahref="http://www.microsoft.com"target="main_page">Microsoft</a><br/><br/><ahref="http://news.bbc.co.uk"target="main_page">Al-Jazeera</a></body></html>

Page 463: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Theremainingspacewillbefilledbythesecondcolumnduetotheinsertingofthe main.htm file.Here ’ sthecontentforthemain.htmfile:

<!DOCTYPEhtml><html><bodybgcolor="#b5dcb3"><h3>Thisismainpage.</h3>

Page 464: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<p>Sonowclickanylinkandseetheresult.</p></body></html>Loadthetest.htmfile.Whenyoudosoyouwouldseethecontentsofthemenu.htmfileintheleftcolumnand “ Thisisthemainpage ”intherightone.

Page 465: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Chapter7:CSS“Computerscienceeducationcannotmakeanybodyan

expertprogrammeranymorethanstudyingbrushesandpigmentcanmakesomebodyanexpertpainter.”-EricS.

Raymond

Page 466: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

WhileHTMLtextsareusedtodepictinformationthatcanbeinterpretedbythewebbrowser,CascadeStyleSheetsareusedinordertostylewebpagesandinterfacesandtodescribehowthewebpagemustbepresented,too.Thinkofitasyouwouldofa

Page 467: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

designerwhodesignsclothesanddecideswhatclotheshismodelsshouldwearorhowtheymustlookwhenthey ’ rewalkingontherampatafashionshow.ThepurposeoftheCSSwastocreateastylesheetlanguagethatwouldbeusedsolelytofunctiontheweb

Page 468: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

page.Separatingawebpage ’ scontentfromitspresentationisadvantageoustowebpagedeveloperswhocanusethestylesheettomakethecontentaccessible.Furthermore,oneneednotuseHTMLtablesforthewebpagelayout.Initially,webpagedevelopers

Page 469: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

whohadtospecifythecoloroftheheaderonawebpage,wouldhavetousethefollowingHTMLelement:<h1><fontcolor="red">Chapter1.</font></h1>.Designingawebpageusingsuchelementswasverytimeconsuming,expensiveand

Page 470: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

inefficient.Theusageofstylesheetsmadeiteasiertomaintainwebpagesandtokeepthepresentationconsistent.Sincestylesheetsarestoredinthewebbrowser ’ scachetheycanbeusedagainandagainandthere ’ snoneedtoreloadit.Hence,datatransferbecomes

Page 471: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

isfasterandmoreefficient,too.Now,thesamecanbedonebyusingthefollowingstyleproperty:<h1style="color:red">Chapter1.</h1>.

IntegratingCSSwithHTMLalsoenableswebpage

Page 472: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

developerstouseGIFs,JPEGandPNGfilestoembedanimationstoo.

Page 473: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

CSSTransitionsThisisrelevanttoanyonelookingtodesignanapp,too.WhattheCascadeStyleSheetdoesisthatitallowsyoutomanipulateanimations.Consequentially,itwouldbealoteasierforyoutochangethesizeoftheanimation.Also,ratherthandoingso

Page 474: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

immediately,youcanreviewhowtheseanimationswouldlookbyreviewingtheseintheirintermediatestates,too.Youcandeterminewhentheanimationwouldstart,howlongtheCSStransitionwilllastandhowitwouldrun,too.Allyouneedtodoistoadjustthedelay,durationand

Page 475: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

timingproperties.Webpagedevelopersassignvaluestodifferentproperties.Asyoulearntodothisyouwouldseethatbysetting,changingorassigningdifferentvaluestothesepropertiesyouareactuallydescribingthebehaviorofthe

Page 476: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

webpage.So,bychangingthevalueofthe Transition-durationyouaredescribinghowlongitshouldtakeforthetransitiontotakeplace.Youmightbewonderinghowthisappliestosomeonewhoisn ’ tinterestedinmakingwebpages.Yousee,style

Page 477: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

sheetsaren ’ tonlyusedtodescribethebehaviorofthewebpage-thesecanalsobeusedtomakevideogames,cartoonsandsuchlike.Thinkaboutit:youcanonlyplayavideogameifyoucanplaywithcharactersandobjectsonascreen.Thestylesheetisusedtodescribethese

Page 478: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

animationstobringthesecharactersandobjectsto ‘ life ’ .Seeingashowyouwouldbelearningtomakesuchcertaingamesinotherchapters,itisimportantthatyouknowofthebasicsofCSSandCSStransitions.

Page 479: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

CSSAnimationsThereareonlysomepropertiesthatareanimatableandcanbemanipulatedbythestylesheetandthischapterwillonlydiscussthosepropertiesthatareapplicabletothegameyouwilllearntomake.Herearesomeofthe

Page 480: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

propertiesyoucancontrolwithCSS:Transition-property:thename(s)ofthepropertyorpropertiesthatneedtobetransitionedarespecified.Hereareexamplesofsuchcontent:borderstyle,borderwidth,background-color,heightandwidth.

Page 481: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

However,assoonaschangesaremadetotheseproperties,allotherpropertieswillchangeinstantaneously,too.Transition-duration:youcanspecifytheamountoftimeinwhichyouwouldlikeforonepropertytotransition.Ifyouwouldliketoapply

Page 482: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

differentdurationstoeachpropertythiscanbedone,too.Transition-timing-function:thisallowsyoutospecifyafunctionsoyoucancontrolhowtheintermediatevaluesforthesepropertiesneedtobecomputed.Inotherwords,

Page 483: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

thiscontrolstherateatwhichthetransitionneedstotakeplace.Youcanmanipulatethetransitionbyusingthecubic-bezieroption.YouneedtoassignavaluetotheXandYaxis.Ease,linearandstep-endareexamplesoftimingfunctions.Transition-delay:this

Page 484: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

propertyenablesyoutodeterminehowlongonewouldhavetowaitforthetransitiontotakeplace.

Page 485: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

DetectingWhenATransitionIsCompleteOncethetransitioniscomplete,standard-compliantbrowserstheeventistransitionend andthiswillofferacoupleofproperties:propertyName:thisisastring

Page 486: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

thatwilltellyouthenameofthecompletedproperty.elapsedTime:thiswilltellyouhowmanysecondshavepassedsincethetransition.Thetransition-delay propertyhasnothingtodowiththis.

Page 487: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

SummaryThoughCSSisnotthemaintopicinthisbook,itisimportantforyoutoknowthatitisusedwithandinHTMLdocuments.TheCSSstylesheetcanalsobeusedtomaketheJavaScriptrunmoresmoothlyandthisissomethingHTMLtexts

Page 488: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

cannotdo.HTMLandCSSaredependentoneachother.ThemarkuplanguageisusedtobuildwebpageswhileCSSstylesheetsareusedtodescribehowthewebpagewouldbehave.Also,withoutthemarkuplanguageitis

Page 489: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

impossibleforanyonetomakeawebpage.

Page 490: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Chapter8:MakingTheHelloWorldAppWithHTMLTexts“Talkischeap.Showmethe

Page 491: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

code.”-LinusTorvalds

MakingtheHelloWorldAppwillhelpyouseehowtheHTMLtextscanbeusedtomakecertainapps.BeforeyouresumeyouneedtoknowaboutJavaScript.YouhavetouseJavaScriptwithHTMLandthatis

Page 492: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

preciselywhatyouwilldohere.

1. LaunchNotepadtomakeyourHTMLfile.

2. Typethefollowingintothedocument:

<!DOCTYPEHTML><html><head>

Page 493: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<title>JavaScriptHelloWorld</title></head><body><h1>JavaScriptHelloWorldExample</h1></body></html>

3. Savethefilebythefollowingname:test.html.ClickonAllFilesonthedropdown

Page 494: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

menuinfrontof“Saveastype”.

ByfollowingthesestepsyouhavesimplycreatedaframeworkfortheHello

Page 495: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Worldapp,usingtheHTMLtemplate.Youdon ’ thavetobeanexperttodosobecausethesestepsarequiteeasytofollow.OncethispartisdoneyouwilladdtheJavaScriptprogrambytypingthefollowinginfrontofthe<h1>

Page 496: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

tag:

<script><alert(“HelloWorld!”)<script>Ifyouweretoinsertthisintothewebbrowseryouwouldseethis:

Page 497: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

JavaScripthasabsolutelynothingtowithJavaitself.YouareonlyusingtheHTMLtexttoinsertJavaScriptintothestructured

Page 498: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

document.

Page 499: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

ConclusionThisbookcoverstheessentialsonHTMLandthebasicsyouneedtoknowaboutit.Ihopeyouenjoyedreadingandlearninghowtocodefromscratch.Thankyou,fordownloading

Page 500: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

thebookonceagain!

Page 501: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

DISCLAIMERCopyright2014©AllRightsReservedNopartofthispublicationmaybereproducedinanyformorbyanymeans,includingprinting,scanning,

Page 502: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

photocopying,orotherwisewithoutthepriorwrittenpermissionofthecopyrightholder.TheAuthorhasstrivedineverywaytobeasaccurateandcompleteaspossibleinthecreationofthisbook,notwithstandingthefactthat

Page 503: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

hedoesnotwarrantorrepresentatanytimethatthecontentswithinthebookareaccurateduetotherapidlychangingnatureofthesubject.Whileallattemptshavebeenmadetoverifyeachandeverypieceofinformationprovided

Page 504: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

inthispublication,theAuthorassumesnoresponsibilityforanyerrors,omissions,orcontraryinterpretationofthesubjectmatterherein.

Page 505: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

IntroductionToCourse“Programmingisusuallytaughtbyexamples.”-

NiklausWirth

TheHTMLmarkuplanguageisusedtomakewebpages.

Page 506: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

TechnologicaldevelopmentshaveledtothecreationofCascadeStyleSheetswhichhaveenabledwebpagedeveloperstohandlethebehaviorofthepageinadifferentmanner.Thisbookhasbeenwrittentoexplaintheutilityofthe

Page 507: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

markuplanguageandstylesheetstoeveryonewhohasnoclueastowhatHTMLorCSSis.Bythetimeyouaredonereadingityouwillbemorefamiliarandconfidentaboutusingthetwoprograms,together,tomakeyourownwebpage.

Page 508: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Don’tgetintimidatedbytechnicaljargonandtheuseofcomplicatedtermsbecausethisbookwillclarifyyourbasicconcepts.Youwillalsocomeacrossvariouslinksandexampleshere.Clickontheseifyouwishtogathermoreinformationonatopicthatyoumightbeinterestedin.

Page 509: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

I’dliketothankyoufordownloadingthisbookinadvanceandhopethatthisguidebenefitsyouincreatingyourveryownwebpage.Goodluck!

Page 510: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Chapter1:IntroductionToHTMLAndCSS“Walkingonwaterand

developingsoftwarefroma

Page 511: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

specificationareeasyifbotharefrozen.”-EdwardBerard

Inthischapter,youwilllearnaboutHTMLandCSS,including:

•HTML•Elements,Tags,andAttributes

Page 512: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Whencreatingawebsiteyouhavetokeeptwothingsinmind:itscontentsanditspresentation.HTMLismarkuplanguagethatwascreatedsothatprogrammerscouldhandleparagraphs,headers,linebreaksandthelike,tomakeawebpage.Themarkuplanguagewascreated

Page 513: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

beforethecascadestylesheets.ThelatestHTMLversionistheHTML5whichhasintroducednewfeaturestothemarkuplanguage.Thismakesthemarkuplanguagefarmoreflexible,user-friendlyandadaptablethanitwasinitially.Cascadestylesheets(CSS)

Page 514: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

werecreatedtohandlethepresentationofawebpage.Itisapresentationlanguagethatdetermineshowthecontentofawebpagewillappear.So,thetwoareseparatefromandindependentofoneanother.Oneenablesprogrammerstohandlethecontentwhilethe

Page 515: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

otherallowsthemtodeterminehowitwillappear.

Page 516: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

HTMLTounderstandhowHTMLandCSSfunctiontogetheryoumustgetanideaofwhatthe2areandhowtheyfunction.Let’sstartwith3terms:elements,tagsandattributes.

Page 517: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Elements,TagsAndAttributesTheseweremadetodefinethestructureofawebpage.So,itallowsyoutodecidewhereyouwanttoplacetheheader,whentodividetheparagraphandhowtousemorethanoneheadersinastructuredHTMLdocument.

Page 518: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Anglebrackets(<>)areusedaroundtheelements.Theseenablethewebbrowsertointerpretandthen,implementwhattheprogrammerwantsittodo.Theelementisinsidetheanglebracket.Yousee,theworldwidewebneedstointerpretcodestoimplementthem.Different

Page 519: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

codesareusedbyvariousprogrammersandhowtheseareinterpretediswhataffectsthecontentonthewebpage.Hereareafewexamples:<p><i>Theelementsandtheangle

Page 520: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

bracketsform,whatareknownas,tags.Thereareopeningtagsandclosingtags.Thetextisinsertedbetweenthetwoandeverythinginsertedbetweenthetwoisthen,changedtolookacertainway.So,let’ssayyouwanttoitalicizethefollowingstatement:“MynameisJoe”.

Page 521: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Thisishowyouwillgoaboutitalicizingit:<i>MynameisJoe</i>Themarkuplanguagewillenabletheinternettointerpretthisstatementsasfollows:MynameisJoe

Page 522: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<i>istheopeningtagand</i>istheclosingtag.Also,suchtagsarereferredtoasanchortexts.Anopeningtagandaclosingoneformsananchoredtext.Attributesareusedsomoreinformationcanbeprovided

Page 523: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

aboutanelement.Herearecommonattributes:id-thisisusedtoidentifyelementsclass-thisisutilizedtoclassifyelementssrc-programmersusethistospecifyasourceforcontentthatcanbeembeddedintothedocument.

Page 524: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Href-thisattributeisusedtolinkuserstoanotherwebsite.Youwillfindthattheseareusuallyinsertedinsidetheopeningtagsandareconstitutedoftheattribute’sname,value,theequalto(=)signandanattributevalue.Here’sanexample:<a

Page 525: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

href="http://google.com/">Google</a>Thiscanbeusedtohyperlinktheword“Google”.So,anyonewhovisitsthewebsitecanclickonGoogleandgotothewebpage.Let’sbreakthisdownnow:<a-theelement

Page 526: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

href="http://google.com/">-theattribute</a>-thetag

Page 527: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Questions1. Whatisthedifference

betweenatagandanelement?

2. WhatisthedifferencebetweenHTMLandCSS ?

Page 528: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Chapter2:HowToUseHTMLToMakeYourOwnWeb

Page 529: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Page“Truthcanonlybefoundinoneplace:thecode.”-Robert

C.Martin

Inthischapter,youwilllearnabouthowtouseHTMLtomakeyourownwebpage,including:

•HowtosetupourownHTMLdocument

Page 530: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

•Nestedelements•Block-levelelements•Self-closingtags•Errorsandsolutions•Applyingwhatyouhavelearned

Page 531: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

HowToSetupOurOwnHTMLDocumentYou’velearnedthebasicsofHTML.ThissectionwillteachyouhowtomakeyourownHTMLdocument.Firstofall,openupatexteditor.SinceIusethe

Page 532: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Windows7platform,IwillutilizeNotepad.MacuserscangoforTextWranglerorsuchlike.Note:DonotuseMicrosoftWordorothertexteditors.

1234

<!DOCTYPEhtml><htmllang="en"><head><metacharset="utf-8"><title>Hello

Page 533: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

567891011

World</title></head><body><h1>HelloWorld</h1><p>Thisyourfirstwebpage.</p></body></html>

TheHelloWorldappwillhelpyoulearnhowyoucanapplythebasicsofHTMLtocreateyourveryfirstHTML

Page 534: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

document.<!DOCTYPEhtml>informsthewebbrowser(thiscanbeInternetExplorer,Safari,MozillaFirefoxand/orGoogleChrome)aboutwhatversionoftheHTMLmarkuplanguageyouwillbeutilizing.Thisisalwaysinsertedintheveryfirstlineofadocument.The <html>is

Page 535: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

usedtotellthebrowser“thisiswhere

mytextstarts”.

Whenprogrammerswanttoinsertaheader,theinsertthe<head>openingtag.Nousercanseethetagitself.Youmightseethedocument’stitleorheadinginstead.The<h>HelloWorld</h1>anchortextisusedtogivetheHTML

Page 536: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

documenttheHelloWorldheader.The <metacharset="utf-8"> tagisusedtotellthewebbrowserhowthecharactersshouldbeencodedorread.The<p>Thisyourfirstwebpage.</p>anchortextisusedtosignifythebeginningofanewparagraph.

Page 537: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Here’swhatyouwillsee:

HelloWorldThisisyourfirstwebpage.

Page 538: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

NestedElementsElementscanbeembeddedwithinoneanothertoorganizeanHTMLdocumentandtomakeitmoreeligible.The<head>and<body>elementswerenestedintothedocument.Theseelementsareindented

Page 539: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

intotheelements.

Page 540: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Block-LevelElementsThesearealsoreferredtoasinlineelementsandtheytendtofillupthespaceoftheparentelementthuscreatingablock.Thisiswhythesearereferredtoas“blocks”too.Theseappearinthe<body>element.Allblock-levelelementswillbeginonnew

Page 541: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

lines.Gothroughthefollowingwebsitetolearnmoreaboutblock-levelelements:https://developer.mozilla.org/en-US/docs/Web/HTML/Block-level_elements.YouneedtoknowaboutthesetounderstandtheBoxModel.

Page 542: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Self-ClosingTagsThesetagsdonothaveclosingtags.Ifyoulookatthepreviousexample,the<meta>taghadnoclosingtag.Theseareknownasself-closingtags.

Page 543: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

ErrorsAndSolutionsAttheendoftheday,allprogrammersarehumansandso,weareboundtomakemistakeinourcodes.Whileitisgoodpracticetogothroughtheseandtofindthemonyourown,youneednotworrybecausebuilt-invalidatorswillhelpyou

Page 544: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

detectandfixmistakes.

Page 545: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

ApplyingWhatYouHaveLearnedYouwill,now,learntoapplywhatyouhavelearned,tomakeawebpageofyourown.Followtheseinstructionstodoso:

1.Openupthetext

Page 546: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

1.<!DOCTYPEhtml>2.<htmllang="en">3.<head>

editorandcreateafileentitledindex.html.SavethisinafolderonyourdesktopentitledHTMLandCSS.2.Savethisdocumentstructureintothefile:

Page 547: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

4.</head>5.<body>6.</body>7.</html>

3.Next,addthefollowingintothehead,metaandtitleelements:

1.<head>

Page 548: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

2.<metacharset="utf-8">3.<title>MyPage</title>4.</head>

4.Now,let’smakethingsalittlemoreinterestingbyaddinginafewmoreelements:

Page 549: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

1.<body>2.<h1>MyPage</h1>3.<p>ThisismyfirstattempttomakeawebpageusingCSSandHTML.Iamsoexcitedaboutdoingthisonmyown!</p>4.</body>

5.Savethefileandgolookforitinthefile

Page 550: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

entitledHTMLandCSS.Dragthistoanywebbrowser.

Trydoingthisexerciseonyourowntogetagraspofhowtogoaboutdoingthisonyourown.Youcanincludeanytextbetweenthetagsshownabove.

Page 551: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

SummaryThischapterfamiliarizesyouwiththeprocessofmakingyourownwebpagebyusingbasicHTMLtoolslikeelements,tagsandyouhavelearnedhowtomaketheHelloWorldappbyutilizingthesetools,too.

Page 552: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999
Page 553: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Questions1.Whatarenestedelements?2.Whatareanchoredtags?

Page 554: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Chapter3:MoreOnHTML“Redundantcommentsarejustplacestocollectliesandmisinformation.”-RobertC.

Martin

Page 555: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Inthischapter,youwilllearnaboutmoreonHTML,including:

•Semantics•Howtoidentifydivisionsandspans•Comments•Howtoutilizetext-basedelements•HowtobuildstructuringbuildHTML

Page 556: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

ThepreviouschapterwasmerelyanoverviewofhowHTMLandCSSworkindependentlyandtogether.Thischapterfocusesentirelyonthemarkuplanguage.

Page 557: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

SemanticsTheseareusedtoenablevariousbrowsers,machines,searchenginesandscreenreaderstoread,comprehendandunderstandwhatiswrittenonthewebpage.ThevalueofthecontentonthewebpageisdescribedbyHTMLsemantics.

Page 558: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999
Page 559: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

HowToIdentifyDivisionsAndSpansWespokeaboutthe<div>and<span>elementsinthepreviouschapter.Theseareimportantbecausetheyallowprogrammerstoapplycertainstylestothecontentonthewebpage.<div>isusedtohandlethe

Page 560: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

webpage’sdesignandlayoutandtoidentifybiggergroupingsofcontent.<span>elements,ontheotherhand,areusedtoidentifysmallergroupingsofcontainedcontent.Thesearefoundwithintheblocksofelementsthemselves.Youwillcomeacrossthesefrequently.

Page 561: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Thepointhereistogoforvaluesthatrefertothecontentandnottheappearanceofsuchelements.

1.<!--Division-->2.<divclass="networking">3.<p>Youcanaddmeon...</p>4.<p>Youwill

Page 562: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

alsofindmeon...</p>5.</div>6.7.<!--Span-->8.<p>Iwillsoon<spanclass="tooltip">writingHTML</span>loginandaddyoutoo.</p>

Page 563: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

CommentsYoucanaddcommentstoyourHTMLandCSStexts.Theseareaddedbyprogrammerstokeepatrackofwhattheyareorweredoingortotakenotes.YoucanaddacommentbythiswayonHTML:

Page 564: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<!--andendwith-->.Thefollowing

syntaxwasacommentintheprevious

example: <!--Division-->.

Page 565: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

HowtoUtilizeText-BasedElements

Openupanywebsiteandyouwillcomeacrossheaders,paragraphs,subheadsandtextsthathavebeenmadeboldortextthatwasitalicizedandsuchlike.Whatyouseeistheproductoftext-basedelementsthatplayanimportantroleinmakingsuchcontentappearacertainway.Headingsareusedtobreakupyourcontentandtomakethetexteligible,organizedandtomakeiteasierforsearchenginestodeterminethecontentonthewebpage.Youcanalsousethesetoestablishhierarchyinthedocument.

Page 566: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Youcanvisitthefollowingwebsitetoseehowdifferentheadingsmightappearonawebpage:

http://learn.shayhowe.com/html-css/getting-to-know-html/.Youcanalsodividethetextintoparagraphsbyusingthe<p>element.Here’sanexample:<p>Hi.MynameisJoeandIaman

engineerwhohasrecentlyshiftedto

Page 567: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

CanadafromtheUS</p>

<p>Iwouldliketotalktoyouabout

theimportanceofbeingoptimistic</p>

Thiswillappearastwoseparateparagraphsonyourwebbrowser.Manybeginnersdonotunderstandthedifferencebetweenthe<b>elementand

Page 568: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

the<strong>element.Thelatterisusedtoattractimportancetoyourtext.Youcangoforthe<b>elementbutyouneedtodecideupontheimportanceofyourtextbeforeyoucandoso.The<b>elementhasnosemanticvalueassuch.Youcanusebothelements,too.Lookatthisexample:<p><strong>Caution:</strong>Donottouch.</p><p>Thisis<b>not</b>thetimeorplaceto<b>talk</b>.</p>

Page 569: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Thisexampleutilizesbothelements.Here’stheresult:

Caution:Donottouch.

Thisisnotthetimeorplacetotalk.

Justastherearetwoelementstomakeyourtextbold,therearetwoelementsthatcanbeusedtoitalicizecertainpartsofyourtexttoo:the<em>andthe<i>elements.The<em>elementcanbeusedtostressoncertainpartsofyour

Page 570: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

text.The<i>elementcanbeusedtostressonastatement,certainwordsinastatementortostressonthetone.Here’showyoucanusetheseelements:<p>Iwould<em>love</em>todance!</p><p>Myname<i>is</i>Joe.</

Thiswouldappearasfollows:

Iwouldlovetodance!

Page 571: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

MynameisJoe.

Page 572: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

HowtoBuildStructureUsingHTML

PriortoHTML5divisionswereusedtodivideandorganizetheHTMLtextbutthesehadnosemanticvalue.HTML5(thelatestversionofthemarkuplanguage)camewithnewelementsthatdidhavesemanticvalue.<header> ,<article> , <section> and <aside>areexamplesofsuchelements.YoucanusethesemorethanonceonthesameHTMLdocument.Theheaderelementisusedtointroduce

Page 573: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

orincludeaheaderinadocument.

Beforeyougoon,youshouldlearn

aboutthedifferencebetweentheheader

andheadelements.Thesemanticvalues

fortheseelementsdiffer.The<header>

elementwillalwaysfallinthe<body>

element.The<head>data,ontheother

hand,comesinthe<html>elementand

itcanlinkyoutootherwebpagesor

websites.Usethisanchorelementto

Page 574: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

createaheader:<header>...</header>Anotherbasic,butimportance,element

isthe<footer>element.Thiscanbe

usedtoidentifytheendingofyourweb

page,anarticle,sectionorsuchlike.

Here’sthefooterelement:<footer>...</footer>

Page 575: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Youcanusethenavigationelementto

linkpeopletootherwebpagesorto

otherwebsites.Usethe<a>anchor

elementtowrapone-offlinks.Ifyou

wouldliketonavigateuserstoother

partsofthesamewebpageorto

anotherwebpage,usethefollowing

element:<nav>...</nav>

Page 576: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Insomeinstancesyoumightwantusers

torefertoanarticlewithindependent

contentthatcanbeusedanddistributed

byothers,too.Todothisusethe

followingcode:<article>...</article>.

Youwanttotidyupyourwebpageso

Page 577: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

it’seligibleandlooksmoreorganized.

Introducingsectionsbyusingthe

<section>elementwouldbeagood

idea.Thiswayyoucangroupthe

contentsdependingupontheir

importanceandhierarchy.Usethe

followinganchorelementforthis

purpose:<section>...</section>.

Page 578: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Beginnersoftengetconfusedaboutusingthe<div>,<article>and<section>elements.Ifitisdifficultforyoutodecideuponanelement,lookatyourcontent.Rememberthatthe<article>and<section>elementsareusedtobringsomestructure.Ifyouwanttogroupthe

Page 579: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

contentsforstylingpurposes,usethe<div>element.

Page 580: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

SummaryBythetimeyouaredonereadingthischapteryoushouldknowaboutvariouselementsthatcanbeusedinyourHTMLdocument.Usetheseelementstobringsomestructureinyourdocumentandtomakeitmoreeligible,user-friendlyandattractive.

Page 581: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999
Page 582: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Questions1.Whataretext-basedelements?2.Giveexamplesoftext-basedelements.3.WhataresemanticsinHTML?

Page 583: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Chapter4:CascadeStyleSheets“Ifyou'veneverprogrammedacomputer,youshould.

There'snothinglikeitinthewholeworld.Whenyou

programacomputer,itdoesexactlywhatyoutellitto

Page 584: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

do.”-CoryDoctorow

Inthischapter,youwilllearnaboutcascadestylesheets,including:

•Selectors•ReferencingCSSwithinHTML

Page 585: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

So,inthefirstchapteryoulearnedthatCSSstylesheetsareusedtochange,modifyanddeterminehowyoucontentwillbepresented.Thischapterwillshedsomelightonthefollowingterms:selectors,propertiesandvalues.Thesearebasictermsthatyouneedtoknowabout

Page 586: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

stylesheets.Note:donotconfuseCSSwithHTML.Elements,tagsandattributesarespecifictothemarkuplanguagewhileselectors,propertiesandvaluesarespecifictothepresentationlanguage.Theyworkdifferently,havedifferentpurposesandboth

Page 587: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

contributetothecreationofthewebpageindifferentways.

Page 588: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

SelectorsSelectorsareusedtostyleCSSusingHTMLelements.ProgrammersusestylesheetstotargetandstylevariouselementsintheHTMLdocument.Forexample,CSScanbeusedtochangethecolor,sizeorthepositionofthetextinthedocument.

Page 589: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Theseareusuallyusedtotargetattributevaluesorelementsthatcontroltheheaderand/orparagraphs.Theseareusuallyfollowedbycurlybrackets:{}.Here’sanexampleofhowthiswouldwork:

Page 590: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

p{color:...;height:...;}Inthisexample,thecolorandheightoftheparagraphcanbemodifiedandstyleddifferently.Oncethestyleis

Page 591: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

determined,youneedtodecidethevaluestoo.Incaseof“color”thiscanbeorange,red,greenetc.Let’stakethesameexample:p{color:red;height:16px;}

Page 592: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

pistheselectorwhilecolorandheightarethepropertiesandorangeand16pxarethevaluesoftheproperties.Thereare3kindsofselectors:type,classandIDselectors.Typeselectorstargetelementsaccordingtheirtypes.Bywayofexample,if

Page 593: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

youwanttotargetdivisionelements,youwillusethedivtypeselectorforallsuchelementslikethis:1div{...}

Here’sthecorrespondingHTML:

Page 594: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

<div>...</div><div>...</div>Then,thereareclassselectorsthattargetanattributebasedonitsclass.Youcanselectagroupofelementsinsteadoftargetingonetypeofselector.Thesameattributevaluescanbeusedformorethanone

Page 595: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

element.Here’sanexample:

1.<Divclass=“nice”>…</div>2.<pclass=“nice”>…</p>

IDselectorsaremuchmorespecificthantheaforementionedselectorsand

Page 596: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

theseselecttheIDoftheattribute.Youcanusetheseonceperstageandthehashsign(#)isusedtodenotethem.Here’showyoucanselectanelementusingtheIDselector:

1.#johndoe{…}

Page 597: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Here’sthecorrespondingHTMLforthis:

1.<divid="shayhowe">...</div>

Gothroughvarioustutorials,booksandexamplesonCSS

Page 598: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

andHTMLandyouwillfindthatthesearesomeofthemostcommontypesofselectorsyouwillcomeacross.However,therearemanyothersoutthere,too.

Page 599: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

ReferencingCSSWithinHTMLTogiveeffecttoCSSyoumustrefertotheCSSfilewithinyourHTMLfile.Whenyouuseonestylesheetforawebsite,youcanapplythesamestyleeverywhereonthesamesite.Onceyoumakecertainchanges,these

Page 600: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

changeswillbeappliedthroughoutthesite.Thiscanbedonebymakinganexternalstylesheet.YoualsohavetheoptionofreferringtotheCSSinaninternalstylesheetandinternalstylesbutnotmanyprogrammersgoforinternalstylesheets.

Page 601: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Rememberhowyouweretaughttousethetexteditorabove?Well,you’llbeusingthesameeditoragain.Thiswillhavethe.cssextension.The.cssextensionnotifiesthatyouhavesavedacssfile.Savethehtmlandcssfileinthesamelocationandfilessoyoucanfindandclickon

Page 602: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

themwheneveryoufeeltheneedtodoso.Takethisexampletoseehowthiscanbedone:

123

<head><linkrel="stylesheet"href="main.css"></head>

What’shappeninghereisthat

Page 603: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

youaredefiningtherelationshipbetweenthetwolanguagesbyusingtherelattribute.The‘stylesheet’valueallowsyoutospecifythekindofrelationshipthetwowillhaveinyourdocumentandthemain.cssfilewillbesavedinthesamefileastheHTMLfile.Thisis

Page 604: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

referredtoastherootdirectory.Thehrefattributeindicateswherethesubfolderfortheattributeisstored.Inthiscasethepathiscorrelatedwiththemain.cssfilewiththesubdirectory‘stylesheet’.

Page 605: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

SummaryThischapterteachesyouhowtousestylesheetstomakeawebpage.Ifyouwillhavenoticed,selectorsareusedtocontrolthepresentationandNOTthecontentofthewebpage.ThatispreciselywhattheCSSismeanttodo.

Page 606: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Questions1.Whatareselectors?2.WhymustyouuseCSSreferences?

Page 607: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Chapter5:MoreOnCSS“Sometimesabstractionandencapsulationareatodds

withperformance—althoughnotnearlyasoftenasmanydevelopersbelieve—butitisalwaysagoodpracticefirsttomakeyourcoderight,and

Page 608: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

thenmakeitfast.”-BrianGoetz

Inthischapter,youwilllearnaboutmoreonCSS,including:

•Properties•Howtocombineselectors•Workingwithspecificityweightslow

Page 609: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

•Lengths

Thedefaultstyleforallwebbrowsersdiffer.Thismeansthatyouwouldhavetousedifferentstyleheadings,paragraphsandsuchlike,differentlyonGoogleChromeandInternet

Page 610: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Explorer.TheadvantageofCSSisthatitenablesyoutoensurethatthereiscross-browsercompatibility.Inotherwords,itisbecauseofstylesheetsthatyoucanseethesamewebpageondifferentbrowsers.WhatCSSdoesisthatittakescommonHTMLelementsandunifiespredefinedstylessoforcross-browsercompatibility.Check

Page 611: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

outthefollowingwebsitetoreadmoreaboutCSSresets:http://meyerweb.com/eric/tools/css/reset/Youcanusestylesheetstochangethebackgroundcolorofcertainpartsofthetext,too.Supposeyouwanttochangethevalueofthecolorandfont-size-inthiscaseyouwilldothefollowing:p{

Page 612: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

background:orange;font-size:16px;}p{background:green;}Usingthisyouwillhavechangedthecolorofthebackgroundofparagraphsonthetopandthen,youwillhavedonethesamefor

Page 613: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

paragraphsthataresituatedatthebottomofthestylesheet.So,theparagraphsituatedatthetopoftheHTMLdocumentwillappeartobeorangeincolorwhilethebackgroundoftheparagraphthatappearsbelowthisparagraphwillbegreenincolor.

Page 614: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

PropertiesYoucanalsoapplythecascadetopropertieswithinindividualselectors.Let’sconsiderthisexample:p{background:orange;background:green;}Ifyouchangethevalueofthe

Page 615: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

backgroundtogreenafterorange,theparagraph’sbackgroundwillbegreenincolor.Youwillfindthatthestylescascadefromtoptobottom.Insomeinstancesthespecificityofyourselectorswillbreak.Everyselectorhasaspecificityweight.Theweightandplacementoftheselectorswilldeterminethestyleofthecascade.

Page 616: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Wespokeabouttype,classandIDselectorsinpreviouschapters.Typeselectorsarethelowestinspecificityweightandonetypeselectorhasavalueof0-0-1.Oneclassselectorhasaweightof0-1-0whileoneIDselector,beingtheheaviestofthe3,hasaspecificityweightof1-0-0.Whenusingselectors,alwaysgivepreferencetothosethathavegreater

Page 617: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

specificityweightsthantherest.Aselectorwithahighspecificityweightwillalwaysappearregardlessofwhetherotherselectorsshow.Let’ssayyouwanttostylizethefollowingHTMLcontent:<pid="food">...</p>Here’showyouwillgoaboutthis:

Page 618: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

#food{background:orange;}p{background:green;}Youcanseeatypeselector(p)andanIDselectorhere.TheIDselectorisheavierthanthetypeselector.Hence,

Page 619: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

theparagraphwillappeartobeorangeinsteadofgreen.Ifyourstylesheetdoesn’tseemrightandifthestylesaren’tbeingappliedproperly,chancesarethatselectorsarebreakingyourcascadebecauseduetothespecificityweights.

Page 620: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

HowToCombineSelectorsIfyouhavereadthepreviouschapterscarefully,youwillhavelearnedaboutselectors,specificityweightsandhowthesecanaffectthecascade.Now,let’slookathowtocombinevariousselectorsby

Page 621: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

usingthefollowingHTMLcontentasanexample:

<divclass="fries"><p>...</p><p>...</p><pclass="red">...</p></div>

Now,let’ssupposethatyouwanttochangetheparagraphelementswithintheclass

Page 622: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

attributethathasavalueof‘fries’sothatitisgreenincolor.Atthesametime,youalsowanttosetthebackgroundcoloroftheclassattributewithavalueofred,soitappearstobeyellow.Here’showyouwillstylethecontent:.friesp{background:green;}

Page 623: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

.friesp.red{background:red;}Combinedselectorsshouldbereadfromlefttoright.Theselectorthatissituatedtotherightiscalledthekeyselector.Intheexamplegivenabove,pisthekeyselector.Thekeyselectoris

Page 624: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

prequalifiedwiththeclassselector,fries.Hence,thecombinedselectorwillonlytargettheparagraphelementswithintheclasselementthathasaclassattributevalueoffires.Inthesecondselector,redappearstotherightandso,thiswillbethekeyselector.Whatthismeansisthatselectorsthatcomebeforeredareallpre-qualifiers.

Page 625: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

WorkingWithSpecificityInCombinedSelectorsWhenyouuseselectors,theirspecificityweightsarecombined,too.Youcanfigureoutthetotalbyaddingtheindividualspecificity

Page 626: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

weightsofvariousselectors.Considertheexamplesabove:.friesp{background:green;}.friesp.red{background:red;}Thefirstselectorhasaclassandtypeselector.Thepoint

Page 627: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

valueoftheclassselectoris0-1-0whiletheweightofthetypeselectoris0-0-1.Addtheirweightandyou’dgetatotalspecificityweightof0-1-1forthatselector.Inthesecondselectoryoucansee2classselectorsandonetypeselector.Ifyouadduptheirspecificityweightsyou’llgetavalueof0-2-1.Thesecondselectorhasahigherspecificityweightthan

Page 628: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

thesecondoneandso,thiswilltakepreferenceoverthefirstselector.Alwaysbewaryofthespecificityweightsbecausethosewithhigherweightsarelikelytobreakthecascade.

Page 629: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

HowToKeepSpecificityWeightsLowTheproblemofbreaksinthecascadecanbefixedbyusingsimilarstylesforeveryelement.Thiswayyoucouldreducethespecificityweight

Page 630: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

oftheselectors,too.Youcaninsertmultipleclassattributevaluesthougheachvaluemustbeseparated.Allyouneedtodoisinsertaspacebetweenthevalues.Thebenefitofthisisthatyoucanuseonestyleonallelementsofthesamesort.Atthesametimeyoucanalsousedifferentstylesforcertainelementsthatbelongtothesamecategory,too.

Page 631: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Thisbitcanbeconfusingbutifyouareinterestedinreadinguponthis,clickonthefollowinglink:http://learn.shayhowe.com/html-css/getting-to-know-css/#combining-selectors.Thelinkwillalsoteachyouhowtousedifferentcolorstostylizeyourtextandso,Iwouldadviseyoutogothroughthecontentsonthewebpage.Sincethisbookis

Page 632: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

meanttobeaguideforbeginners,Iwillnotaddressthetopichere.

Page 633: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

LengthsTherearetwotypeoflengthswhereCSSstylesheetsareconcerned:absoluteandrelative.Theformerlengthismeasuredincentimeters,millimeters,inchesandsuchlike.However,themostpopularchoice,amongstprogrammers,isthepixel.Thepixelisgreatfor

Page 634: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

beginners.p{font-size:14px;}

Relativelengths,asthenamesuggests,dependononeanotherandthesearemuchmoredifficulttocontrolforbeginners.Percentagesandemvaluesareusedforrelativelengths.So,ifyou

Page 635: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

wanttosetthewidthofanyelementto50%,youneedtoknowofthewidthoftheparentvalue.Oncethisisidentified,youcanadjustthewidthaccordingly..col{width:50%;}Youcanusepercentagestoadjusttheheightandwidthof

Page 636: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

anelement.Utilizingpercentageswillalsoenableyoutoalterthelayoutofyourwebpage.Incaseofemunitsyouneedtoconsiderthefontsizefirst.

Page 637: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

SummaryThischapterteachesyouaboutspecificityweightsofvariousselectorsandhowthesecanaffectthecascadeitself.Alwaysremembertogoforlowerspecificityweightstopreventthecascadefrombreaking.Italsotouchesuponabsoluteandrelativelengthsthatprogrammersuseintheir

Page 638: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

HTMLdocuments.

Page 639: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Chapter6:TheBoxModel“Thetroublewithcomputersisyou*play*withthem.Theyaresowonderful.Youhavetheseswitches-ifit'saneven

Page 640: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

numberyoudothis,ifit'sanoddnumberyoudothat-andprettysoonyoucandomoreandmoreelaboratethingsifyouarecleverenough,ononemachine.”-RichardP.

Feynman

Inthischapter,youwilllearnabouttheboxmodel,including:

Page 641: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

•Introductiontotheboxmodel•Applyingtheboxmodel

Page 642: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

IntroductionToTheBoxModelAccordingtotheconceptoftheboxmodel,allelementsonawebpagearerectangularboxes.However,thesizeoftheboxisdeterminedbypropertiesthatcanbe

Page 643: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

controlledbyprogrammers.Thecoreofthisrectangularboxisdefinedbytheheightandthewidthofanyelementwhichcanbeadjustedinthedisplayproperty,byitscontentsandbyspecifyingthewidthandheightproperties.Thedimensionsofthebox

Page 644: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

canbemodifiedbychangingandadjustingthepaddingandborderelements.Youcanalsoadjusttheborderbyspecifyingthemargin.Itisimportantthatyoudeclarethevaluesfirstorelsetheywillreturntotheirdefaultvalues.

Page 645: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

TheBoxModel

Page 646: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

ApplyingTheBoxModelYouneedtoadjustandplayaroundwiththeboxmodeltocorrectthedisplaysothatthewebpagecanbepresentedinacertainway.Thepropertiesmentionedabovewillhelpyouwiththis.Youcancalculatethewidth

Page 647: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

ofvariouselementsbyusingthisformula:margin-right+border-right+padding-right+width+padding-left+border-left+margin-left.Youcanalsocalculatetheheight:margin-top+border-top+padding-top+height+padding-bottom+border-bottom+margin-bottom.

Page 648: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Insomeinstancesthewidthpropertyvaluemaybelessthantheboxitself.Tocorrectthisyouneedtoadjustthepadding,marginsandbordersofthatbox.Thisisbecausethewidthdoesn’tjustincludethewidthpropertyvalueitselfbutitalsoincludesthesepropertyvalues.

Page 649: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Thepresetvalueoftheelementisdependentonthedisplayvalue.Thedefaultvalueforanyblock-levelelementis100%.Block-levelelementstakeupany(horizontal)spaceavailabletothem.Sinceinlineelementstendnottohaveaspecificsize,widthandheight

Page 650: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

propertieswillonlyberelevantincaseofnon-inlineelements.So,youcanusethispropertyifyouwanttosetaspecificwidthforsuchanelement:div{width:100px;}

Page 651: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Theheightofanyelementisdependentuponthecontent.Elementstendtoexpandanddecrease(vertically)toadjusttheircontents.Usetheheightpropertyforyournon-inlineelement.Themarginpropertywillenableyoutoadjusttheamountofspacethat

Page 652: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

surroundsanelement.Youcandefinethemarginsofanelementtodecidehowyouwouldliketopositiontheelementonapage.Visitthefollowingwebsitetolearnmoreabouttheboxmodel:http://learn.shayhowe.com/html-css/opening-the-box-model/.

Page 653: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Youcanuserealexamplestomakeandadjustyourownboxmodel.

Page 654: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

SummaryThischaptercoversthebasicsoftheboxmodel.Everyelementhasaboxmodelandyoucanchangethemodelbyplayingaroundwithaforementionedproperties.

Page 655: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Questions1.Whatistheboxmodel?2.Howcanyouadjusttheboxmodel?

Page 656: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Chapter7:HowToPositionContent“Howyoulookatitisprettymuchhowyou'llseeit”-

Page 657: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

RasheedOgunlaru

Inthischapter,youwilllearnabouthowtopositioncontent,including:

•Floats•Typeoffloats

CSSallowsyoutobringstructureandtocreateaflow

Page 658: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

inyourcontent.Youcanpositionthecontentindifferentways.Thischapterexploreshowyoucanpositionthecontent.

Page 659: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

FloatsThefloatpropertycanbeusedtopositioncontentontheHTMLdocument.Thegoodthingaboutthispropertyisthatitisquiteversatile.Youcanutilizethispropertybyremovinganelementonapageandrepositioningithorizontally

Page 660: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

(totheleftorright)andtherestofthecontentswill“float”andrearrangethemselveswithit.Youcanuseitonmorethanoneelementsimultaneously,too.Withthispropertyyoucanadjust,fix,modifyorcreatethelayoutofyourwebpage.Lookatthisexampleandtry

Page 661: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

usingitinanHTMLdocumenttofamiliarizeyourselfwithfloats:img{float:left;}

Tryplayingaroundwithfloatsonthefollowingwebsite:

Page 662: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

http://codepen.io/shayhowe/pen/utfmw

Page 663: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

TypesOfFloatsTherearetwotypesoffloats:clearingandcontainingfloats.Clearingfloatsareusedtopreventthefloatpropertyfromwrappingfloatedelementsandtocleartheminstead.Thereare3valuesforclearingfloats:right,leftandboth.Youcan

Page 664: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

clearthefloatsontherightortheleftwiththefirsttwovalues.However,ifyouwouldliketoclearfloatsonbothsidesgofor“both”instead.div{clear:left;}

Page 665: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Containingfloatsworkprettymuchthesamewaythatclearingfloatsdobuttheadvantageofthefloatisthatitensuresthestylesaren’tchangedoraffected.Thefloatsarecontainedintheparentelement.Theelementsinsidetheparentelementarecontainedandelements

Page 666: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

outsidetheparentelementareleftunaffected.Ifyouwanttoreadmoreaboutthese,clickonthefollowinglink:http://css-tricks.com/all-about-floats/.

Page 667: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

SummaryThischaptergivesyouabriefintroductiontocertainpropertiesthatwillhelpyoupositionthecontentonyourHTMLdocument.Thefloatpropertyisoneofthemostusefulpropertiesforrepositioningcontentonawebpage.

Page 668: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Chapter8:TypographyLegacycode.Thephrase

strikesdisgustintheheartsofprogrammers.Itconjures

imagesofsloggingthroughamurkyswampoftangledundergrowthwithleachesbeneathandstingingfliesabove.Itconjuresodorsof

Page 669: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

murk,slime,stagnancy,andoffal.Althoughourfirstjoyofprogrammingmayhavebeenintense,themiseryofdealingwithlegacycodeisoftensufficienttoextinguishthatflame.”-MichaelC.Feathers

Inthischapter,youwilllearnabouthowtopositioncontent,including:

•Floats

Page 670: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

•Typeoffloats

TypographyhasenabledprogrammerstoembedvariousfontsinHTMLdocumentsandavarietyoftypefacesareattheirdisposal,too.TypefacesgivetheHTMLtextacertainlookandfeel.Fonts,ontheotherhand,

Page 671: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

allowsyourcomputertoaccessthattypeface.

Page 672: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

AddingColorToYourTextWhenmakingyourHTMLdocumentconsiderthetypefaceyouwouldliketoutilizeandthecoloryouwantyourtexttobein.Youmerelyneedtousethecolorpropertytoplayaroundwithcolorsforyourtext.

Page 673: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

html{color:#555;}

Page 674: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

FontPropertiesYoucanchangefontpropertiestoedityourwebpageandtoimproveitslookandfeel.Youmustfirstdeclarethefont.Forthisyoushouldusethefont-familyproperty.Youcanusemorethanonefontnamebutyoumustseparatethesewith

Page 675: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

commas.Thefirstdeclaredfontthatstartsfromtheleftisyourprimaryfontchoice.Incasetheprimaryfontchoicecannotbeimplemented,thealternativechoicewillbeimplementedinstead.body{font-family:"CourierNew",TimesNewRoman,Arial,Aharoni;

Page 676: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

}

Inthisexample,CourierNew,istheprimaryfontchoice.However,ifthiscannotbeusedorifitisunavailableTimesNewRomanisthenextoption.

Page 677: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

FontSizeThisenablesyoutocontrolandmanagethesizeofthetext.Youcanuseemunits,pixels,points,font-sizesandpercentagestomodifythefontsize.Youcanalsomodifythefontstylesothatcertainpartsofthetextisitalicized.You

Page 678: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

needtousethefont-stylepropertyforthisandthereare4valuesthatthispropertywillaccept: italic , normal , oblique ,and inherit .Theitalicvaluewillitalicizethetextwhilenormalwillreturnittowhatitwasbeforeitwasitalicized.Youmust

Page 679: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

usethespecialclasswhenchangingthefontsize:.special{font-style:italic;}

Youcanalsochangethetypefacebymakingcertainpartsofthetextbold.Forthisyoumustusethefont-weight

Page 680: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

property.Fivevaluescanbeusedforthispurpose:bold,normal,bolder,inheritandlighter..daring{font-weight:lighter;}

Programmersutilizethe

Page 681: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

followingnumericvaluestoincreasetheweightofatypeface:100,200,300,400,500,600,700,800and900.100isthelowestandthinnestofallnumericalvalueswhile900isthebiggestandso,yourtextwouldappeartobeverythickifyougoforthisvalue.

Page 682: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

.daring{font-weight:900;}

Page 683: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

AdjustTheLineHeightTheterm“lineheight”referstotheamountofspacebetween2lines.Thehigherthevalue,thefurtheraparttwolineswillbe.Thelowerthevalue,thecloserthetwolineswillbe.body{

Page 684: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

line-height:24px;}

Page 685: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

SummaryFontsizescanbemanipulatedtomodifyorchangeyourtext’slook.Variouspropertiesareusedforthispurpose.Thischapterteachesyouhowtodoso.

Page 686: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

ConclusionThankyoufordownloadingandreadingthisbook.There’salotmoreinformationonhowyoucanuseCSSandHTMLtomakeyourownwebpageandIapologizefornotincludingmoreinformationonthese

Page 687: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

areas.However,thisbookisonlymeanttoguideandfamiliarizebeginnerswithafew,basicconcepts.Onceyouhavefamiliarizedyourselfwithbasicconceptsyoucangoontomoreadvancedconcepts.Ifyoufeelthatyouarereadytolook

Page 688: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

intotheseyoucanbrowsethroughthevariouslinkIhavecopy/pastedafewlinksthatwillbenefityouonyourjourney.

Page 689: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

DescriptionAreyousomeonewhowouldliketostarthisorherownwebsite?Ifyes,youneedtolearnaboutHTMLandCSS.Everyprogrammerandwebpagedeveloperusestheselanguagesfortheirwebsites.HTMListhemarkup

Page 690: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

languagewhichenableswebpagedeveloperstocontrolthecontentofyourwebsitewhileCSShelpshandlethepresentationandbehaviorofthiscontent.ThisbookwillfamiliarizeyouwithafewbasicconceptsontheHTMLandCSSsoyoucanapplywhatyouhave

Page 691: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

learned.Learnhowtousethelanguagestoyouradvantage.Thiscomprehensiveguideconsistsofalltheinformationyouneedasabeginner-andmore!Youwillcomeacrossanumberoflinksinthebook.

Page 692: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Clickonthesetolearnmoreabouttheselanguages.Attemptafeweasyquestionstorevisethesechapters.Bythetimeyouaredonereadingthisbookandbrowsingthroughusefullinksinsidethebook,youwillbepreparedtostartyourownwebsite!

Page 693: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Areyouafraidoftechnicaljargon?Don’tbe!Thisbookexplaineverythinginlaymentermssothatanyonewhoisn’tfamiliarwithcoding,HTML,CSSandprogrammingcanrelatetoit.Goodluck!

Page 694: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

IntroductionEveryonewantstotakechargeoftheirlifeandbecomesomeonewhocancalltheshots.Giventhecurrenttrendsintheeconomy,itisonlynaturalthatpeople —studentsandnewprogrammersmostofall

Page 695: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

—becomeapprehensiveaboutemploymentopportunities.Thereisnobetterwayoflandingyourselfajob —onethatyoulove,enjoy,andinwhicheveryeffortyouputwilldeliverresultbackatyou—thanbecomingyourown

Page 696: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

boss.Thesimplestandmostcost-effectivewayforstudentstodothatisthroughfreelancing.Youcan,andyoumust,becomeyourownboss —andforonesimplereason:“Ifyoudon'tbuildyour

Page 697: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

dream,someonewillhireyoutohelpbuildtheirs”

Youmusthavereadthisline999timesbeforeinyourlifewithoutpayinganyattentiontoit.Here ’ stohopingthatthousandthtime ’ sthecharm.Somebodywillhireyoubecausethey ’ dwanttohone

Page 698: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

anduseyourskillstobuildtheirbusiness.Whynotspendtimeworkingwithrealclients,understandingtheirrequirements,dealingwiththeirqueries,andhandlingtheprojectonyourown?i.e.doingthesamethingasyouwouldbedoingifhired.Thenagain,manystudents

Page 699: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

shyawayfrombuildingtheirowndreams.

Page 700: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

FearOfBeingPaidWehaveseenandtalkedwithmanystudents,askingwhytheywouldnotstarttheirownfreelancingact?Mostofthemaresimplyfearfulofnotbeingpaidfortheprobationperiodwherethey ’ dmakemistakesandhonetheirskillsetforthenon-bookish,

Page 701: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

practical,clientcenteredmarketplace.Inaphrase,theonlythingthatmostnewstudentsareafraidofstartingtheirownfreelancingact,andlaterafull-fledgedbusiness,isthefearofrisk.Theriskofnotbeingpaidforthemonths

Page 702: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

wheretheygraspthemarket,andrealizethespecificmarketnichewheretheycanbecomeanauthority.Theybelievethatjoiningafirmsavesthemthistrouble,asevenduringtheirlearningprocess(readbecomingpartofthecompanyandhoning

Page 703: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

skillsnecessaryforthatcompany ’ swork),theygetpaid.

Butthat’saloadofcompilererrors

…andthisreportaimstode-bugthemistakesthatstudentsandnewprogrammersmake

Page 704: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

whilewritingthesyntaxfortheirfutureendeavors.

Page 705: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

FearOfFacingTheCompetitionThefearofcompetitionisthesecondscourgethatwreakshavocwithnewprogrammers ’andstudents ’abilitytolaunchthemselvesintothemarketasfreelancers.Thebasicpremiseisthatsinceallthelowhangingfruit

Page 706: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

hasbeengobbledupbypioneeringfreelancers,andwhohavebuiltastrongportfolioofprojectsandservices,newcomersdonotstandachanceofbeingofferedprojects.Understandthis:we ’ reintheeraoftabletsand

Page 707: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

smartphones.Insimplerwords,we ’ reinanerawhere:• People consumecontent off the internet atunprecedentedrates• Work mobility andhence Bring Your OwnDevice policies are

Page 708: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

becominganorm• E-commerce andmobile commerce hasoutpacedretailstores(sinceseveralyearsago)▪ Organizations andbusinesses,largeandsmall,are highly dependent onappsforperformingroutinetasksaswell as interacting

Page 709: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

withpotentialcustomers

Inaphrase,weliveinanerawherethreethingsarenevergoingtobeenoughtogoaround:▪ Content (Written,Videos,Infographics,etc)

▪ InternetSpeed/Bandwidth

Page 710: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

▪AppsandSoftware

Asaresult,thereareneverenoughbiddersorserviceproviderstogoconsumingthewishesofclients —mostofwhomwanttogetthejobdoneatshortnotice.

Page 711: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

FearOfClosingDoorsOnACareerAsCoder/ProgrammerThisisperhapsthebiggestfear.Workingasafreelancerisoftenseenbynewprogrammersandstudentsasagoodbyetotheircareers.It

Page 712: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

isprimarilyfueledbytheperceptionthatthefirstjobaftergraduation,orfirstjobingeneraldefinesyourfutureprospects.Therewasatimewhenfreelancing,andhomeschooling,wereseenasunacceptablemeansandmeasuresofaperson ’ sabilitytocopewiththe

Page 713: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

demandsofthemarketplace.Butnolonger.What ’ sthefirstthingthatemployerslookforinacandidate ’ sresumethesedays?

Experience.Period.

Theylookforinternships,additionalcoursework,and

Page 714: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

anythingthatwouldprovethatacandidatehadexperiencewithnon-hypothetical(readbookish,andnormallyobsolete)work.Freelancingbuildsaportfolio.Itshowsthatyouhaveworkedwithrealclientshopingforsolutionsfor

Page 715: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

currentproblems.Freelancingexperience,andtheportfolioyougettoshowcase,showsyourabilitytohandlediverseclientsandmanageallaspectsofprojects.Whichemploywouldn ’ twantareadymadecandidatefortheirteam?Thenagain,

Page 716: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

whichfreelancerintheirrightstate(exceptforthesakeofexpandingtheircircle)wouldwanttooptforacareerwhentheycouldexpandtheirbusiness?

Page 717: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

FreelancingYourExpertiseIfyouhavetheskills,thentheonlydifferencebetweenstartingyourownfreelancingbusinessandbeingemployedatafirmisthe “ risk-free-and-fully-paid ”probationperiod:

Page 718: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

•Incaseofbecominganemployee,thisperiodwillteachandhoneskillsneededtocompletethetasksassignedtoyou.

▪ Incaseoffreelancing,this period will make abetter project manager,contractor, andprogrammer, plus a

Page 719: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

credible authority in yourcircle with a strongportfolioandconnections.

Freelancing is not likeearning a PhD inmathematics. It’s simple, andifyouhave theprogrammingskills, a profitable job (youdon’t get paid remember?)and an enjoyable journey tobuildingyourbrandname.

Page 720: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

SuccessfulFreelancingSinceweareadamantinshowinghowpeople(studentsandnewprogrammers)can:• Easily lend their

Page 721: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

coding/programming skill-sets to their freelancingefforts

• Honeprogramming/coding,clienthandling, andotherprojectmanagementskills

▪ Dobothof theabovebetter, and get paid better,andgainall thecredit,and

Page 722: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

buildaportfolio

Webelievethatthebestwaytounderstandhowtoworkasafreelanceristocomparehowafirmnormallyworkonline.

Page 723: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Step#1SelectingPlatformsAswithyouremployment,thefirststepistoenterthemarketplaceandsearchthevariousorganizationswhereyoucangetthejob.Withfreelancing,thisstepisaboutfindingtherightfreelancingplatformormarketplace.

Page 724: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Someofthetopandcrediblefreelancingplatformsincludethefollowing:•Elance

•oDesk

•Guru

•PeopleperHour

•RentACoder

•GetACoder

Page 725: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

▪ Programmer MeetDesigner

Eachplatformhasitsuniquelayout,navigationpane,anddashboardi.e.auniqueworkenvironmentbutallofthemhaveafewcommonfeaturesthatmakeiteasiertoshiftfromoneplatformtothe

Page 726: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

other,butsomeaspectsthatremainsimilaracrossallfreelancingplatformsinclude:•WritingProfiles

•Exams

•TheBiddingProcess

▪QueryHandling

So,thefirststepisselecting

Page 727: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

theplatformthatbestfitsyourpersonalityandcreatingthefirstprofile.We ’ llstartwithElance,butthisissothatweavoidtheinitialdilemmathatnewfreelancersface:creatingmultipleprofilesatthestart.Honestly,doingthatisthe

Page 728: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

perfectrecipefordisaster.Creatingjustone,oratmaxtwoprofiles,ismorethanenoughtogetyourgiggoing.“Whatifyouwanttoexpandintootherplatforms?Won’tyouhavetostartallover

again?”It ’ sagoodthought,butNO,youwon ’ thavetostart

Page 729: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

again.Youcansimplyincludealinktoyourportfolioandreviewsonyourfirstprofiletoshowthatyouhavepriorexperienceinthefield.Theruleofthumbforstartingfreelancingistoremainfocused.Thiseliminatesthede-motivatingproblemof “ notgetting

Page 730: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

selected ”frommultiplesources.Here ’ syourroadmapfortheprofile:Sticktoone,dedicateyoureffortstocreatingasharpprofile,commiteffortandtimetoeachbid,andthengiveityouralltomeetandexceedclientexpectations.

Page 731: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

So,yourfirststep:VisitElanceNow,andJoin!It ’ sFREE!

Page 732: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999
Page 733: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

It ’ stimetostartwritingyourprofile.VisitElanceNow!

Page 734: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

WritingYourProfileAswithapplyingforanorganization,itisessentialthatyoupresentagoodupfrontcoverletterandresume.Infreelancing,yourprofileisthecoverletterandyourbiddingmessageistheresumethatyouhavetopresenttoeachclient.

Page 735: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

OnceyouhaveregisteredanaccountonElance,whichcanbedonebyusingyourexistingsocialmediaprofilesforFacebookorLinkedIn,it ’ stimetocreateyourbrandimagebywritingtheprofile.Onceregistered,youwillfindthatElancehasanautomatic

Page 736: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Wizardthatwillleadyouthroughalltheareasthatneedtobecompleted.Followit,completing,andsavingaseachstepprogresses.Fornow,theprimefocusisonkeepingyourselfgluedto

Elance.Thismeansthatyoushouldleaveworriesaboutcreatinga

Page 737: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

website,ablog,orsocialmediaprofilesforyourbrand.Thingsthatyoushouldworryaboutareincludingaprofessionalimageoralogoforyourprofile.Yourphotoshouldbearepresentationofyouasifyouwereappearingforaninterviewwiththe

Page 738: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

prospectiveclient.Addthephotoyou ’ rewillingtoaddtoyouractualresume.KeepyourphotoclosetoyourfaceasduringthebiddingprocessElance,andotherfreelancingsites,willdisplayasmallpicturebesidethebid.Soaphotocroppedclosertoyourfacewillstandout.

Page 739: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Next,completethebasicinformation,andavoidspendingtoomuchtimeonoptionalfieldslikethetagline.Youcanchangeitovertime.Leavehourlyratesempty.Thisareadefinesthe

Page 740: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

minimumhourlyratethatyou ’ llbeworkingfor,anditcanreduceyourflexibility.Bynotindicatinganhourlyfixedrateyouhavetheoptionofbiddingabitmoreaggressivelyonsomeprojects.Furthermore,incaseyouareabletocompletetasksfaster,hourlyratescouldkillyour

Page 741: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

earnings.CompletetheOverview.Onceyouhavebidonaproject(discussedlater),thebuyerislikelytovisityourprofileforfurtherinformation.Thefirstthingthatisvisibleistheoverview:around150wordsthattalkaboutyourskillsandwhat

Page 742: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

youcandeliver.✓Talkaboutbenefitstobuyer

✓Talkaboutyourabilitytodothework

✓Talkaboutpriorexperience/work

✓Addacalltoaction

Page 743: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

SampleProfile“ Astrongcommitmenttodeliveringafunctional,well-documented,andeasilyreadablecodeallowsmetothoroughlyunderstandandcommunicateyourprojectspecification,andcreateafunctionalcodewithinyourstipulatedtimeline.

Knowinghowacode ’ sfunctionalityandyour

Page 744: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

expectationcanevolveduringthecourseofthebuildingprocess,youwillreceivemultiplerevisions.Mycommitmenttodeliveringprojectsonparwithyoursatisfactionmeansthatyourproject

Mysoleconcernistoemploymy skill set to create uniquecodes for your needs. Mybackgroundin[ADD,A,B,C]

Page 745: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

allows me to grasp projectspecifications and easilytranslate them into workingcode. My experience inwriting, testing, anddebugging code in [ADDskills, A, B, C] EITHER 1)My work on [ADDexperience or Course, or thecode that you have to show]earned me [Add anyachievement]OR2)Mygoalis to make sure you ’ re

Page 746: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

satisfied with your projectand it ’ s delivered on timeandwithinyourbudget. ”Sothen,jotdownyouruniqueofferings,brainstormsomeideas,andustheaboveprofileto:WriteAProfileOf

YourOwn!Next,chooseyourspecialty,

Page 747: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

addthecredentials(education,certifications,licenses,etc).ElanceoffersauniqueoptionofVERIFYINGyourcredentials.Useittoboostyourauthoritytotheclient.

Page 748: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

TakingExamsMostfreelancingplatformshaveasetofinternalexamsthattestandmarkyourcompetenceforspecificskills.Examplesincludetestswithmultiplelevels(Level1,2,3,etc)e.g.English(U.S,U.K,etc),BasicArithmetic,Programmingmethods,C++,

Page 749: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Javascript,ActionScript,etc.Passingthesetestsearnsyourprofileabadgethatispublicallydisplayedwheneveryoubid.Take,theexams.Mostofthemarefree!

Page 750: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999
Page 751: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Here ’ syourchallenge:Selecttheteststhatbestrepresentyourexpertise,passthem,andboostyourcredentialsbyaddingcredibilitytoyourbids.

Page 752: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Step#2FindingClients—BiddingOnProjectsThenextthingyouneedtodoissearchthroughjobpostingstofindonesthatarerelevanttoyourfieldofexpertise.Bidding,asyouwillfind,simplyaclickofamouse.

Page 753: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Whatyouwritemakesallthedifference,especiallywhenyoudonothaveascoreofreviewstograntyouleverageincaseyouhavetowriteashortbid.Keepyourproposalsclientcentered.Talkabouttheprojectdescription,

Page 754: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

communicatethatyouunderstanditbytellingwhatyouhaveinmind.Askrelevantquestionswhenyouthinkthatapointneedssomeclarification.Thiswilldisplayyourcommitmenttotheprojectaswellasyourempathytowardsunderstandingtheclient ’ s

Page 755: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

needsandexpectations.Provethatyouhaveunderstoodthedescription.DON ’ Tuseagenerictemplateforallyourbids.Showthatyouhaveactuallyreadthedescriptionandspenttimeunderstandingit.Whenyouhavealready

Page 756: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

donethat,whynotcommunicateit?Explainthesolutionthatyouhaveinmind,theaspectsthatseemedvague,andtheprocessworkflowthatyouwillemploy —inaphrase,showtheclienthowyouhopeto,andwanttocommityourselftotheproject.

Page 757: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Thisnormallyresultsinadditionalcommunicationfromtheclient,whomightaskforsamplework.Forfirst-timers,thiscanprovetobeadauntingtask.Challengeyourself:Gotothedashboardandsearch

Page 758: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

throughtheprojects.Nowcreateatleast10biddingproposals,specifictotheprojectdescriptions.NOTE:Attimesitmighttakeadayortwofortheclienttorespond,sointhemeantime,commityourselftofindinggoodprojectsandbidding10ofthemeveryday.

Page 759: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Spendthesparetimeworkingonyoursamplesorwritingcontent,orsurfingthenetfornewerideas!

Page 760: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Step#3CreatingWorkSamplesClientswanttoifyouhavedonesomethingsimilartowhattheyareaskingfor,beforehiringyou.It ’ sonlynatural.Thereareafewsimplewaysofcreatingyourportfolioevenbeforeyou ’ veworkedwithaclient:

Page 761: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

•Contributetoanopensourceproject.Tryselectingonprojectsthatarenewbutgainingpopularity.Itiseasierandlesscomplextoworkonthese.Pickabugoraproblemandfixit.•Re-skinanappor

Page 762: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

createyourownappanduploadittoyourblog/websiteoranonlinemarketplace.✓Contributearticles/tutorialsonshortfixes,debuggingissues,orworkingwithcode.

Thisiswherecreatingablog

Page 763: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

orasimplewebsiteprovesbeneficial.Itcanactasaportalforyourfreelancingwork.Youcansimplypointtheclientstotheworkyou ’ vedoneonyourwebsite,ortotheworkyouhavecontributedontheprojects.

Page 764: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Samplesareessentialtothesuccessofyourbids.Almostalwaystheclientwillaskforsomesampleoftheworkthatyouhavedone.Hence,beforeyoustartbidding,workonsomeworkingsamplesofyourcode.

Page 765: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Step#4Reviews—BuildingAPortfolioAndRepeatClientsOnceyouhavesharedthesampleswiththeclient,youwouldreceivetheadditionaldetailsfortheproject.Thisisthepointwhereyoumustspendasmuchqueriesand

Page 766: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

emails,ortimeonSkypeconversationstounderstandwhattheclientisexpecting.Themoreyoucommunicatewiththeclientearlyon,thebetteritbecomestomoveonwiththeproject.Thesimplest,triedandtested,andprofessionalmethodof

Page 767: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

buildingreviews,aportfolio,andrepeatclientsistodeliveryourcodeandexplainyourprogress.Thismeanskeepingyourclientintheloopbyshowingsomefunctionalityoftheworkthatyou ’ vedeliveredsofar,whereyou ’ reheaded,theproblemsthatmayhavearisen.

Page 768: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Bykeepingtheclientconstantlyupdatedontheprogressofyourworkandseekingtheirfeedback,youbuildrelations.Asaresult,andifyoudeliversatisfactorycode,youcangetrepeatandreferralclients,andreceivefeedbacksandreviewswhen

Page 769: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

youaskforitattheendoftheproject.Ifyouhaveputintheeffort,andcommunicatedittotheclient,youareonyourwaytoreceivinga5starratingandreviewintheend. “ Onyourway ” ,becauseevenattheendoftheprojectyouhaveto

Page 770: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

communicatetotheclientwhattheratingandreviewmeansforyou.It ’ syourjobtoremindthem,becausealotofclientshaveurgentdeadlinesandunlessyouremindthemtoleaveafeedback,theyarelikelytoforget.Here ’ sasamplequeryyoucanuseattheend

Page 771: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

ofgoodproject:Hi[Name],

[Commentsabouttheproject]I ’ m glad that you liked thecode.Ifthereisanythingelsethat I can be of help with,especially if there isanypart

Page 772: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

oftheworkyou ’ renot100%satisfied with. Just let meknowandI ’ llreworkituntilyou have exactly whatyou ’ relookingfor.

[The Review]If there is nofurtherworktobedone,I ’ dreally appreciate it if youcould leavea5star feedbackfor me on Elance. [Reason]The review would be sohelpful for me in securing

Page 773: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

furtherwork. [ReiterateYourCommitment]Ifyoufeelanyaspect of the work that wasdeliveredwasn ’ tupto5starstandard, please don ’ thesitate to letmeknow. I ’ lldoeverythingtobringituptothemark.

It has been a pleasureworkingwithyou.

ThankYou.

Page 774: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Regards,Remember,aslongasyoukeepdeliveringoutstandingworktoyourclientsanddisplayingyourprofessionalismandcommitmenttoqualitythroughouttheproject,theyshouldleaveyouthe5starfeedbackyou ’ veaskedfor.

Page 775: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Hereareafewprimersonyourqueries:• Always explainwhatyouhavedone in theworkthatyou’resending.Lettheclientknowoftheprogressthatyouhavemade so far,what you’re working on

Page 776: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

now,andhopetodeliverinthenextupdate.

✓ Nevershyawayfromasking for furtherinformation. New comersoften think that askingmoreinformationabouttheproject from the clientmakes them appear less ofanexpertintheirwork.On

Page 777: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

the contrary, clients willappreciate yourcommitment tounderstanding their projectneeds. Then again, howelse will you deliver theright code unless you donotknowwhattheclientisexpectingofyou?

Sowriteyourquerieslike

Page 778: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

yourentireprojectdependedonit!

Page 779: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Step#5ManagingTimeAndResourcesBeingafreelancerisliberating,butitalsocomeswithsomeresponsibilities.Realizingthemaheadoftimewillsaveyoualotofstress.Hereareafewprimersthatwillkeepyouontrackwhilemanagingyourtime,

Page 780: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

resources,andyourhealth.•Treatyourfreelancingworkasastartup.Understandthatasafreelancer,youareanownerofasmallbusiness.ACEOifyoumay.Thismeansthatyouareresponsibleforeverythingfromleadgenerationand

Page 781: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

sales(bidding),customersupport(queryhandling),andallstrategicdirectionsforthebusiness(buildingandexpandingaportfolio,establishingyourself,creatinganddeliveringuniquevalueforcustomers,etc).

•Don’tIsolate

Page 782: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Yourself.Youarenotthesolesurvivorofaneconomicapocalypse,butpartofagrowinggroupofpeople.Connectwiththem.Otherfreelancecodersknowthechallengesthatyouarefacingandwillhappily,andempathically,sharetricksthatcanbe

Page 783: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

usedtoyourbattles.

•CreateaHealthyworkSchedule.Takebreaks.Freelancingcantakeatollonyournormalworkday.Youhavetheoptionoftakingbreaksasyouseefit,andsetyourownworkinghours.Noonecanholdyou

Page 784: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

responsibleforyourwork.Butthiscanleadintoanunhealthylifestyle.Thebestwayoutistocreateahealthyschedule,andnotbecomecagedinyourhouse.Setbreaktimeswhereyoutakeastrollorgoouttogetsomelunch.Avoidtheurgetoworklate

Page 785: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

hoursintothenight.Disturbingyourbodyclock(andcircadianrhythms)isjusttherightrecipetobecomeexhausted.

Berealisticwhencommittingtojobs.Don ’ tsimplyjumpateveryopportunityyoureceivei.e.don ’ tbidoneveryproject

Page 786: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

thatcomesyourway.Theinitialenthusiasmcanwearoffifyouhavemanysmallerprojectsthatleavenoroomforbigprojectsandopportunities.Agoodruleofthumbistoleaveaquarterofthemonthfreesothatyoucanleaveyourselfsomewriggleroomforhunting

Page 787: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

biggerprojects.

Page 788: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

CompilingWordsIthasneverbeeneasierforstudentsandnewprogrammerstobecometheirownboss,ortostarttheirownbusiness.Thenagain,therehasneverbeenagreater

Page 789: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

needforfreelancingexpertsinthesoftwareindustry.Thisisprimarilybecauseofthepresenceofestablishedsoftwarehousesandbrandsthatchargeexorbitantsumfortheirservices.Asaresult,SMEsandorganizationsareturningtoflexibleoptionsofferedbyprofessional

Page 790: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

freelancers.Freelancingoffersstudentsandnewprogrammerslikeyourselftheabilitytoestablishyourselvesasaprofessional,anexpert,andasabusiness.Theexperienceyougainworkingthroughyourprojectswillnotonly

Page 791: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

boostyourabilitytounderstandandhandlebiggerprojects,butalsoincreaseyourindustrystatureasanexpertinyourfield.Sogoahead!• Create your Elanceprofile

•Createagreatprofile

Page 792: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

• Commit yourself towriting unique bids on atleast10projectsaday

• Communicateextensively and buildrelations

•Dedicateyoureffortstomeetingcustomerneeds

•Askfor5-startreviews

✓Andrepeat

Page 793: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Allthebest!

Page 794: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

ThankYouForReadingThisBook.YourFirst$1000BonusReport

Page 795: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

ClickHereForInstantAccess

Page 796: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999
Page 797: HTML5 HTML PROGRAMMING CRASH - DropPDF1.droppdf.com/files/ZPFB7/html-css3-a-step-by-step-guide-to-creat-s… · HTML5 is the heir of HTML 4.01, which was released way back in 1999

Uploadedby.X0RN.{Zer07}[BЯ]