Intro to html


Published on

Basic concept of HTML

Published in: Technology
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Intro to html

  1. 1. Intro to HTML The Basics
  2. 2. HTML HTML means Hyper Text Markup Language . HTML is a language that helps us to create web sites in the Internet . HTML helps to coordinate human and the computer . So we have to use some codes to explain to computer what are we going to do. Therefore we use HTML to give instructions to create web sites.
  3. 3. Why We Learn HTML?
  4. 4. Tim Berners-Lee ( CERN physicist) Creator of HTML & WWW CERN is an European Organization for Nuclear Research at Geneva
  5. 5. <ul><li>HTML is an evolving standard (as new technology/tools are added) </li></ul><ul><ul><ul><li>HTML 1 (Sir Tim Berners-Lee, 1989): very basic, limited integration of multimedia </li></ul></ul></ul><ul><ul><ul><ul><li>in 1993, Mosaic added many new features (e.g., integrated images) </li></ul></ul></ul></ul><ul><ul><ul><li>HTML 2.0 (IETF, 1994): tried to standardize these & other features, but late </li></ul></ul></ul><ul><ul><ul><ul><li>in 1994-96, Netscape & IE added many new, divergent features </li></ul></ul></ul></ul><ul><ul><ul><li>HTML 3.2 (W3C, 1996): attempted to unify into a single standard </li></ul></ul></ul><ul><ul><ul><ul><li>but didn't address newer technologies like Java applets & streaming video </li></ul></ul></ul></ul>Beginning of HTML
  6. 6. Beginning of HTML (cont.) <ul><ul><ul><li>HTML 4.0 (W3C, 1997): current standard (but moving towards XHTML) </li></ul></ul></ul><ul><ul><ul><li>attempted to map out future directions for HTML, not just react to vendors </li></ul></ul></ul><ul><ul><ul><li>HTML 4.01(W3C, 1999): </li></ul></ul></ul><ul><ul><ul><li>XHTML 1.0 (W3C, 2000): HTML 4.01 modified to conform to XML standards </li></ul></ul></ul><ul><ul><ul><li>XHTML 1.1 (W3C, 2001): “Modularization” of XHTML 1.0 </li></ul></ul></ul><ul><ul><ul><li>HTML 5 ( Web Hypertext Application Technology Working Group, W3C, 2006): New </li></ul></ul></ul>
  7. 7. HTML Tags <ul><li>We use some codes to explain to computer what are we going to do. These codes called as “Tags”. </li></ul><ul><li>HTML tags must type in the angle brackets(<>) ,it wants to type in a text editor and save with .htm or .html extension. If we use a tag we should close the tag. To close the tag we use closing tags(</>). </li></ul>
  8. 8. Software & Text Editors <ul><li>What You See is What You Get(Software): </li></ul><ul><ul><li>Dreamweaver, Microsoft FrontPage, Netscape Composer, Adobe Page Mill, ,Hotdog </li></ul></ul><ul><ul><li>Word (Save As Webpage) </li></ul></ul><ul><li>Text Editors </li></ul><ul><ul><li>Notepad </li></ul></ul><ul><ul><li>Word pad </li></ul></ul><ul><ul><li>Code View </li></ul></ul><ul><ul><li>GEdit </li></ul></ul><ul><ul><li>Nano Editor </li></ul></ul>
  9. 9. <ul><li>In HTML we use some essential tags. They are </li></ul><ul><li><html> </li></ul><ul><li><head> Heading Section </li></ul><ul><li><title></title> </li></ul><ul><li></head> </li></ul><ul><li><body></body> </li></ul><ul><li></html> Body Section </li></ul>
  10. 10. HTML Tags <ul><li>Tag – an HTML code that tells the browser HOW to display something </li></ul><ul><ul><li>Opening Tag <h3> </li></ul></ul><ul><ul><li>Closing Tag </h3> </li></ul></ul><ul><ul><li>Example : < b>This will be bold </b> </li></ul></ul><ul><li>Tags will not appear in browsers </li></ul><ul><li>All open tags must have corresponding closing tag. </li></ul>
  11. 11. Attributes <ul><li>Attributes provide additional display information about a tag </li></ul><ul><li>Attributes appear within the opening tag brackets </li></ul><ul><li>Attribute values must be contained in quotes </li></ul><ul><li>You can have more than one attribute in a tag </li></ul><ul><li><font size=“1” color=“green&quot;> This text would be green and smaller </font> </li></ul>
  12. 12. HTML Tags
  13. 13. Basic Tags <html></html> Creates an HTML document <head></head> Sets off the title and other information that isn't displayed on the Web page itself <body></body> Sets off the visible portion of the document
  14. 14. Header Tags <title></title> Puts the name of the document in the title bar Things in the header section do not appear in the browser
  15. 15. Body Attributes <body bgcolor=?> Sets the background color, using name or hex value <body text=?> Sets the text color, using name or hex value <body background=url> Specifies an image file to be used as background <body vlink=?> Sets the color of followed links, using name or hex value <body alink=?> Sets the color of links on click
  16. 16. Text Formatting Tags 1 <hl></hl> Creates the largest header <h6></h6> Creates the smallest header <b></b> Creates bold text <i></i> Creates italic text
  17. 17. Text Formatting Tags 2 <strong></strong> Emphasizes a word (with italic or bold) <font size=“?”></font> Sets size of font <font color=“?”></font> Sets font color, using name or hex value <font face=“?”></font> Set font style like Comic Sans MS
  18. 18. Paragraph Formatting Tags <p></p> Creates a new paragraph <p align=?> Aligns a paragraph to the left, right, or center <br> Inserts a line break <blockquote></blockquote> Indents text from both sides
  19. 19. <ul><li>Ordered Lists – this is a numbered list, starts with <ol> and ends with </ol>, each new item in list requires the <li> tag </li></ul>HTML Formatting Sample code…. <ol> List Name <li> list item 1 <li> list item 2 <li> list item 3 <li> list item 4 </ol> Browser view… Yankees Starting Lineup 1. Johnny Damon 2. Derek Jeter 3. Bobby Abreu 4. Robbie McGarry
  20. 20. <ul><li>Un-ordered Lists –bulleted list of items, starts with <ul> tag and ends with </ul> tag, and each list item begins with <li> </li></ul>HTML Formatting Sample code…. <ul> List Name <li> list item 1 <li> list item 2 <li> list item 3 <li> list item 4 </ul> <ul><li>Browser view… </li></ul><ul><li>Yankees Starting Lineup </li></ul><ul><li>Johnny Damon </li></ul><ul><li>Derek Jeter </li></ul><ul><li>Bobby Abreu </li></ul><ul><li>Robbie McGarry </li></ul>
  21. 21. <ul><li>Definition Lists –not a list of items but a list of terms and explanations or definitions </li></ul><ul><li>Note: inside a definition list (the <dd> tag) you can put paragraphs, line breaks, images, links and other lists </li></ul>HTML Formatting Sample code…. <dl> <dt>Vocab Word 1 <dd>Definition 1 <dt>Vocab Word 2 <dd>Definition 2 </dl> Browser view… Rock hard object, made.. Ball round object….
  22. 22. Table Formatting Tags <ul><li><table></table> Creates a table </li></ul><ul><li><tr></tr> Sets off each row in a table </li></ul><ul><li><td></td> Sets off each cell in a row </li></ul><ul><li><table border=#> Sets width of border around table cells </li></ul><ul><li><table width=“ ? %” or height=“ ? %”> Sets width and height of table - in pixels or as a percentage of document width </li></ul>
  23. 23. How Tables Work <tr> </tr> <table> </table> <td> </td> <td> </td> </td> <td> <tr> </tr> <td> </td> <td> </td> </td> <td> <tr> </tr> <td> </td> <td> </td> </td> <td>
  24. 24. Images Img = image src = source of the image alt = stands for alternate and is used to name the image, important for visually impaired users (text to speech) <img src =“nameoftheimage.jpg” alt=“description”> <img src =“nameoftheimage.gif” alt=“description”>
  25. 25. Images Aligning Images can be done with the “align=“ tag. Place this inside of your image source code. You can only align to the right or to the left with this tag. <img src=“name.jpg” alt=“description” align=“right”> *Note <img….> tag is an empty tag with no </img> tag necessary
  26. 26. Image as a Link <a href=“url or file name”><img src = “imagefile.jpg” alt=“description”></a> Insert the img src tag in place of the clickable text on a normal link
  27. 27. Creating Links <ul><li>Two types of links </li></ul><ul><li>absolute: link to an outside website </li></ul><ul><li>relative: link to another page within your website </li></ul><ul><li>HTML uses the <a> (anchor) tag to create a link to another document </li></ul><ul><li>An anchor can point to any resource on the Web: an HTML page, an image, a sound file, a movie, etc. </li></ul><ul><li>The correct Syntax of creating an anchor: </li></ul><ul><li><a href=&quot;url&quot;>Text to be displayed</a> </li></ul>
  28. 28. Creating Absolute Links <a href=&quot;url&quot;>Text to be displayed</a> Anchor Tag Href attribute used to address the document to link to Where this link will take you Text hyperlink that appears in browser Closing Anchor Tag
  29. 29. Creating Relative Links <a href=“nameofpage.html&quot;>Text to be displayed</a> Anchor Tag href attribute used to address the document to link to Where this link will take you (page within website name Text hyperlink that appears in browser Closing Anchor Tag
  30. 30. Link Tag Html Links : Html links are defined with the <a> tag Syntax : <a href=&quot;;>Gmail</a> Example : <html> <body> <a href=&quot;;>Gmail</a> </body> </html> Gmail O/P : If we click this link it goes to gmail account