html_tutorial.pdf - HTML About the Tutorial HTML stands for...

This preview shows page 1 out of 428 pages.

Unformatted text preview: HTML 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. Though HTML 4.01 version is widely used but currently we are having HTML-5 version which is an extension to HTML 4.01, and this version was published in 2012. Audience This tutorial is designed for the aspiring Web Designers and Developers with a need to understand the HTML in enough detail along with its simple overview, and practical examples. This tutorial will give you enough ingredients to start with HTML from where you can take yourself at higher level of expertise. Prerequisites Before proceeding with this tutorial you should have a basic working knowledge with Windows 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 republish any contents or a part of contents of this e-book in any manner without written consent of the publisher. We strive to update the contents of our website and tutorials as timely and as precisely as possible, however, the contents may contain inaccuracies or errors. Tutorials Point (I) Pvt. Ltd. provides no guarantee regarding the accuracy, timeliness or completeness of our website or its contents including this tutorial. If you discover any errors on our website or in this tutorial, please notify us at [email protected] i HTML Table of Contents About the Tutorial .................................................................................................................................... i Audience .................................................................................................................................................. i Prerequisites ............................................................................................................................................ i Copyright & Disclaimer............................................................................................................................. i Table of Contents .................................................................................................................................... ii 1. HTML – OVERVIEW.............................................................................................................. 1 Basic HTML Document ............................................................................................................................ 1 HTML Tags ............................................................................................................................................... 2 HTML Document Structure ...................................................................................................................... 3 The <!DOCTYPE> Declaration .................................................................................................................. 3 2. HTML – BASIC TAGS............................................................................................................. 4 Heading Tags ........................................................................................................................................... 4 Paragraph Tag ......................................................................................................................................... 5 Line Break Tag ......................................................................................................................................... 5 Centering Content ................................................................................................................................... 6 Horizontal Lines ...................................................................................................................................... 6 Preserve Formatting ................................................................................................................................ 7 Nonbreaking Spaces ................................................................................................................................ 8 3. HTML – ELEMENTS ............................................................................................................ 10 HTML Tag vs. Element ........................................................................................................................... 10 Nested HTML Elements ......................................................................................................................... 10 4. HTML – ATTRIBUTES .......................................................................................................... 12 Core Attributes...................................................................................................................................... 13 Internationalization Attributes .............................................................................................................. 14 The xml:lang Attribute .......................................................................................................................... 16 ii HTML 5. HTML – FORMATTING ....................................................................................................... 18 Bold Text ............................................................................................................................................... 18 Italic Text .............................................................................................................................................. 18 Underlined Text .................................................................................................................................... 19 Strike Text ............................................................................................................................................. 19 Monospaced Font ................................................................................................................................. 20 Superscript Text .................................................................................................................................... 20 Subscript Text ....................................................................................................................................... 21 Inserted Text ......................................................................................................................................... 21 Deleted Text .......................................................................................................................................... 22 Larger Text ............................................................................................................................................ 22 Smaller Text .......................................................................................................................................... 23 Grouping Content.................................................................................................................................. 23 6. HTML – PHRASE TAGS ....................................................................................................... 26 Emphasized Text ................................................................................................................................... 26 Marked Text .......................................................................................................................................... 26 Strong Text ............................................................................................................................................ 27 Text Abbreviation ................................................................................................................................. 27 Acronym Element .................................................................................................................................. 28 Text Direction........................................................................................................................................ 28 Special Terms ........................................................................................................................................ 29 Quoting Text ......................................................................................................................................... 29 Short Quotations ................................................................................................................................... 30 Text Citations ........................................................................................................................................ 30 Computer Code ..................................................................................................................................... 31 Keyboard Text ....................................................................................................................................... 31 Programming Variables ......................................................................................................................... 32 iii HTML Program Output .................................................................................................................................... 32 Address Text ......................................................................................................................................... 33 7. HTML – META TAGS .......................................................................................................... 34 Adding Meta Tags to Your Documents .................................................................................................. 34 Specifying Keywords ............................................................................................................................. 34 Document Description .......................................................................................................................... 35 Document Revision Date ....................................................................................................................... 35 Document Refreshing ............................................................................................................................ 36 Page Redirection ................................................................................................................................... 37 Setting Cookies...................................................................................................................................... 37 Setting Author Name ............................................................................................................................ 38 Specify Character Set ............................................................................................................................ 38 8. HTML – COMMENTS.......................................................................................................... 41 Valid vs Invalid Comments .................................................................................................................... 41 Multiline Comments.............................................................................................................................. 42 Conditional Comments .......................................................................................................................... 43 Using Comment Tag .............................................................................................................................. 43 Commenting Script Code ....................................................................................................................... 44 Commenting Style Sheets ...................................................................................................................... 45 9. HTML – IMAGES ................................................................................................................ 46 Insert Image .......................................................................................................................................... 46 Set Image Location ................................................................................................................................ 47 Set Image Width/Height ........................................................................................................................ 47 Set Image Border................................................................................................................................... 48 Set Image Alignment ............................................................................................................................. 49 Free Web Graphics ................................................................................................................................ 49 iv HTML 10. HTML – TABLES ................................................................................................................. 50 Table Heading ....................................................................................................................................... 51 Cellpadding and Cellspacing Attributes ................................................................................................. 52 Colspan and Rowspan Attributes .......................................................................................................... 53 Tables Backgrounds............................................................................................................................... 53 Table Height and Width ........................................................................................................................ 55 Table Caption ........................................................................................................................................ 56 Table Header, Body, and Footer ............................................................................................................ 57 Nested Tables........................................................................................................................................ 58 11. HTML – LISTS ..................................................................................................................... 60 HTML Unordered Lists ........................................................................................................................... 60 The type Attribute ................................................................................................................................. 61 HTML Ordered Lists ............................................................................................................................... 63 The type Attribute ................................................................................................................................. 63 The start Attribute ................................................................................................................................ 67 HTML Definition Lists ............................................................................................................................ 67 12. HTML – TEXT LINKS............................................................................................................ 69 Linking Documents ................................................................................................................................ 69 The target Attribute .............................................................................................................................. 69 Use of Base Path ................................................................................................................................... 70 Linking to a Page Section ....................................................................................................................... 71 Setting Link Colors ................................................................................................................................. 72 Download Links ..................................................................................................................................... 72 File Download Dialog Box ...................................................................................................................... 73 13. HTML – IMAGE LINKS ........................................................................................................ 74 Mouse-Sensitive Images ........................................................................................................................ 74 v HTML Server-Side Image Maps ........................................................................................................................ 75 Client-Side Image Maps ......................................................................................................................... 76 Coordinate System ................................................................................................................................ 77 14. HTML – EMAIL LINKS ......................................................................................................... 78 HTML Email Tag ..................................................................................................................................... 78 Default Settings ..................................................................................................................................... 78 15. HTML – FRAMES ................................................................................................................ 79 Disadvantages of Frames ...................................................................................................................... 79 Creating Frames .................................................................................................................................... 79 The <frameset> Tag Attributes .............................................................................................................. 81 The <frame> Tag Attributes ................................................................................................................... 82 Browser Support for Frames ................................................................................................................. 83 Frame's name and target attributes ...................................................................................................... 83 16. HTML – IFRAMES ............................................................................................................... 86 The <Iframe> Tag Attributes .................................................................................................................. 86 17. HTML – BLOCKS ................................................................................................................. 88 Block Elements ..................................................................
View Full Document

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern