HTML - GitHub Pages

Transcription

HTMLAbout the TutorialHTML stands for Hyper Text Markup Language, which is the most widely used language onWeb to develop web pages.HTML was created by Berners-Lee in late 1991 but "HTML 2.0" was the first standard HTMLspecification which was published in 1995. HTML 4.01 was a major version of HTML and itwas published in late 1999. Though HTML 4.01 version is widely used but currently we arehaving HTML-5 version which is an extension to HTML 4.01, and this version was publishedin 2012.AudienceThis tutorial is designed for the aspiring Web Designers and Developers with a need tounderstand the HTML in enough detail along with its simple overview, and practicalexamples. This tutorial will give you enough ingredients to start with HTML from whereyou can take yourself at higher level of expertise.PrerequisitesBefore proceeding with this tutorial you should have a basic working knowledge withWindows or Linux operating system, additionally you must be familiar with: Experience with any text editor like notepad, notepad , or Edit plus etc.How to create directories and files on your computer.How to navigate through different directories.How to type content in a file and save them on a computer.Understanding about images in different formats like JPEG, PNG format.Copyright & Disclaimer Copyright 2015 by Tutorials Point (I) Pvt. Ltd.All the content and graphics published in this e-book are the property of Tutorials Point (I)Pvt. Ltd. The user of this e-book is prohibited to reuse, retain, copy, distribute or republishany contents or a part of contents of this e-book in any manner without written consentof the publisher.We strive to update the contents of our website and tutorials as timely and as precisely aspossible, however, the contents may contain inaccuracies or errors. Tutorials Point (I) Pvt.Ltd. provides no guarantee regarding the accuracy, timeliness or completeness of ourwebsite or its contents including this tutorial. If you discover any errors on our website orin this tutorial, please notify us at contact@tutorialspoint.comi

HTMLTable of ContentsAbout the Tutorial . iAudience . iPrerequisites . iCopyright & Disclaimer. iTable of Contents . ii1.HTML – OVERVIEW. 1Basic HTML Document . 1HTML Tags . 2HTML Document Structure . 3The !DOCTYPE Declaration . 32.HTML – BASIC TAGS. 4Heading Tags . 4Paragraph Tag . 5Line Break Tag . 5Centering Content . 6Horizontal Lines . 6Preserve Formatting . 7Nonbreaking Spaces . 83.HTML – ELEMENTS . 10HTML Tag vs. Element . 10Nested HTML Elements . 104.HTML – ATTRIBUTES . 12Core Attributes. 13Internationalization Attributes . 14The xml:lang Attribute . 16ii

HTML5.HTML – FORMATTING . 18Bold Text . 18Italic Text . 18Underlined Text . 19Strike Text . 19Monospaced Font . 20Superscript Text . 20Subscript Text . 21Inserted Text . 21Deleted Text . 22Larger Text . 22Smaller Text . 23Grouping Content. 236.HTML – PHRASE TAGS . 26Emphasized Text . 26Marked Text . 26Strong Text . 27Text Abbreviation . 27Acronym Element . 28Text Direction. 28Special Terms . 29Quoting Text . 29Short Quotations . 30Text Citations . 30Computer Code . 31Keyboard Text . 31Programming Variables . 32iii

HTMLProgram Output . 32Address Text . 337.HTML – META TAGS . 34Adding Meta Tags to Your Documents . 34Specifying Keywords . 34Document Description . 35Document Revision Date . 35Document Refreshing . 36Page Redirection . 37Setting Cookies. 37Setting Author Name . 38Specify Character Set . 388.HTML – COMMENTS. 41Valid vs Invalid Comments . 41Multiline Comments. 42Conditional Comments . 43Using Comment Tag . 43Commenting Script Code . 44Commenting Style Sheets . 459.HTML – IMAGES . 46Insert Image . 46Set Image Location . 47Set Image Width/Height . 47Set Image Border. 48Set Image Alignment . 49Free Web Graphics . 49iv

HTML10. HTML – TABLES . 50Table Heading . 51Cellpadding and Cellspacing Attributes . 52Colspan and Rowspan Attributes . 53Tables Backgrounds. 53Table Height and Width . 55Table Caption . 56Table Header, Body, and Footer . 57Nested Tables. 5811. HTML – LISTS . 60HTML Unordered Lists . 60The type Attribute . 61HTML Ordered Lists . 63The type Attribute . 63The start Attribute . 67HTML Definition Lists . 6712. HTML – TEXT LINKS. 69Linking Documents . 69The target Attribute . 69Use of Base Path . 70Linking to a Page Section . 71Setting Link Colors . 72Download Links . 72File Download Dialog Box . 7313. HTML – IMAGE LINKS . 74Mouse-Sensitive Images . 74v

HTMLServer-Side Image Maps . 75Client-Side Image Maps . 76Coordinate System . 7714. HTML – EMAIL LINKS . 78HTML Email Tag . 78Default Settings . 7815. HTML – FRAMES . 79Disadvantages of Frames . 79Creating Frames . 79The frameset Tag Attributes . 81The frame Tag Attributes . 82Browser Support for Frames . 83Frame's name and target attributes . 8316. HTML – IFRAMES . 86The Iframe Tag Attributes . 8617. HTML – BLOCKS . 88Block Elements . 88Inline Elements . 88Grouping HTML Elements . 88The div tag . 88The span tag . 9018. HTML – BACKGROUNDS . 91Html Background with Colors . 91Html Background with Images . 92Patterned & Transparent Backgrounds . 93vi

HTML19. HTML – COLORS . 95HTML Color Coding Methods . 95HTML Colors - Color Names . 95W3C Standard 16 Colors . 96HTML Colors - Hex Codes. 96HTML Colors - RGB Values . 98Browser Safe Colors . 9920. HTML – FONTS . 102Set Font Size . 102Relative Font Size . 103Setting Font Face . 104Specify alternate font faces . 104Setting Font Color . 105The basefont Element: . 105Example of the basefont Element . 10621. HTML – FORMS . 107Form Attributes . 107HTML Form Controls . 108Text Input Controls. 108Single-line text input controls . 108Attributes . 109Password Input controls . 109Attributes . 110Multiple-Line Text Input Controls . 110Attributes . 111Checkbox Control . 112Attributes . 112vii

HTMLRadio Button Control . 113Select Box Control . 114Attributes . 114File Upload Box . 115Button Controls . 116Hidden Form Controls . 11722. HTML – EMBED MULTIMEDIA . 118The embed Tag Attributes . 119Supported Video Types . 119Background Audio . 120HTML Object tag . 12123. HTML – MARQUEES. 123The marquee Tag Attributes . 12324. HTML – HEADER . 126The HTML title Tag . 126The HTML meta Tag . 127The HTML base Tag. 128The HTML link Tag . 128The HTML style Tag . 129The HTML script Tag . 13025. HTML – STYLE SHEET . 131External Style Sheet . 132Internal Style Sheet . 133Inline Style Sheet . 13426. HTML JAVASCRIPT . 136External JavaScript . 136viii

HTMLInternal Script . 137Event Handlers . 138Hide Scripts from Older Browsers . 138The noscript Element. 139Default Scripting Language . 13927. HTML – LAYOUTS. 141HTML Layout - Using Tables . 141Multiple Columns Layout - Using Tables . 142HTML Layouts - Using DIV, SPAN .

About the Tutorial HTML stands for Hyper Text Markup Language, which is the most widely used language on Web to develop web pages. HTML was created by Berners-Lee in late 1991 but "HTML 2.0" was the first standard HTML specification which was published in 1995. HTML 4.01 was a major version of HTML and it was published in late 1999.