HTML Introduction


SUBMITTED BY: Elchin

DATE: Aug. 9, 2016, 7:06 a.m.

FORMAT: Text only

SIZE: 3.6 kB

HITS: 5581

  1. What is HTML?
  2. HTML is a markup language for describing web documents (web pages).
  3. HTML stands for Hyper Text Markup Language
  4. A markup language is a set of markup tags
  5. HTML documents are described by HTML tags
  6. Each HTML tag describes different document content
  7. A Small HTML Document
  8. Example
  9. <!DOCTYPE html>
  10. <html>
  11. <head>
  12. <title>Page Title</title>
  13. </head>
  14. <body>
  15. <h1>My First Heading</h1>
  16. <p>My first paragraph.</p>
  17. </body>
  18. </html>
  19. Try it Yourself ยป
  20. Example Explained
  21. The <!DOCTYPE html> declaration defines this document to be HTML5
  22. The text between <html> and </html> describes an HTML document
  23. The text between <head> and </head> provides information about the document
  24. The text between <title> and </title> provides a title for the document
  25. The text between <body> and </body> describes the visible page content
  26. The text between <h1> and </h1> describes a heading
  27. The text between <p> and </p> describes a paragraph
  28. Using this description, a web browser will display a document with a heading and a paragraph.
  29. HTML Tags
  30. HTML tags are keywords (tag names) surrounded by angle brackets:
  31. <tagname>content goes here...</tagname>
  32. HTML tags normally come in pairs like <p> and </p>
  33. The first tag in a pair is the start tag, the second tag is the end tag
  34. The end tag is written like the start tag, but with a forward slash inserted before the tag name
  35. The start tag is also called the opening tag, and the end tag the closing tag.
  36. Web Browsers
  37. The purpose of a web browser (Chrome, IE, Firefox, Safari) is to read HTML documents and display them.
  38. The browser does not display the HTML tags, but uses them to determine how to display the document:
  39. View in Browser
  40. HTML Page Structure
  41. Below is a visualization of an HTML page structure:
  42. <html>
  43. <head>
  44. <title>Page title</title>
  45. </head>
  46. <body>
  47. <h1>This is a heading</h1>
  48. <p>This is a paragraph.</p>
  49. <p>This is another paragraph.</p>
  50. </body>
  51. </html>
  52. Only the <body> section (the white area above) is displayed in a browser.
  53. The <!DOCTYPE> Declaration
  54. The <!DOCTYPE> declaration represents the document type, and helps the browser to display a web page correctly.
  55. It must only appear once, at the top of the page (before any HTML tags).
  56. There are different document types. To display a web page correctly, the browser must know both type and version.
  57. The doctype declaration is not case sensitive. All cases are acceptable:
  58. <!DOCTYPE html>
  59. <!doctype HTML>
  60. Common <!DOCTYPE> Declarations
  61. HTML5
  62. <!DOCTYPE html>
  63. HTML 4.01
  64. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  65. XHTML 1.0
  66. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  67. All tutorials and examples at W3Schools use HTML5.
  68. HTML Versions
  69. Since the early days of the web, there have been many versions of HTML:
  70. Version Year
  71. HTML 1991
  72. HTML 2.0 1995
  73. HTML 3.2 1997
  74. HTML 4.01 1999
  75. XHTML 2000
  76. HTML5 2014
  77. <a href="https://coince.com/?u=C9925923"><img src="http://d3egzi0yt25uex.cloudfront.net/bitcoin/coince/1.gif" width="728" height="90" alt="Coince - Bitcoin Investment Solution" border="0"></a>
  78. <a href="https://coince.com/?u=C9925923"><img src="http://d3egzi0yt25uex.cloudfront.net/bitcoin/coince/2.gif" width="468" height="60" alt="Coince - Bitcoin Investment Solution" border="0"></a>
  79. <a href="https://coince.com/?u=C9925923"><img src="http://d3egzi0yt25uex.cloudfront.net/bitcoin/coince/3.gif" width="160" height="600" alt="Coince - Bitcoin Investment Solution" border="0"></a>

comments powered by Disqus