w3schools.com HTML Introduction

Card Set Information

w3schools.com HTML Introduction
2014-01-13 15:05:05
HTML Introduction from w3schools
Introduction to basic HTML
Show Answers:

  1. HTML Example (first program)
    • <!DOCTYPE html>
    • <html>
    • <body>

    <h1>My First Heading</h1>

    <p>My first paragraph.</p>

    • </body>
    • </html>
  2. DOCTYPE declaration
    • Defines the document type.
    • Is in all caps, preceded by exclamation point.
  3. Between <html> and </html>
    Describes the web page
  4. Between <body> and </body>
    Is the visible page content
  5. Between <h1> and </h1> (or h2, h3, h4, h5 or h6)
    Code for text displayed as a heading
  6. Between <p> and </p>
    Code for text displayed as a paragraph
  7. What is HTML?  (Answer with 6 aspects)
    • A language for describing web pages.
    • 1.  Stands for Hyper Text Markup Language
    • 2.  Is a markup language
    • 3.  A markup language is a set of markup tags
    • 4.  The tags describe document content
    • 5.  HTML documents contain HTML tags and plain text
    • 6.  HTML documents are also called web pages
  8. What are HTML Tags?
    Basic Structure of a tag.
    • HTML markup tags are called simply HTML tags
    • 1.  HTML tags are keywords (tag names) surrounded by angle brackets like <html>
    • 2.  Normally come in pairs like <b> and </b>
    • 3.  First tag is the start tag, the second is the end tag
    • 4.  End tag is written like the start tag, but has a forward slash before the tag name
    • 5.  Start and end tags are also called opening tags and closing tags
    • Form:  <tagname>content</tagname>
  9. HTML Elements
    Example of an element
    • "HTML tags" and "HTML elements" are often used to describe the same thing, but technically elements are everything between the tags and the tags themselves.  Tags refer only to the tags themselves.
    • Example:  <p>This is a paragraph.</p>
  10. Web Browsers
    • Purpose is to read HTML docs and display them as web pages.
    • They don't display tags, but use them (tags) to determine how the content of the HTML page is to displayed to the user.
  11. HTML Page Structure
    • <html>
    •      <body>
    •           <h1>This is a heading</h1>
    •           <p>This is a paragraph.</p>
    •           <p>This is another paragraph.</p>
    •      </body>
    • </html>
  12. HTML versions
    • 1991 HTML
    • 1993 HTML+
    • 1995 HTML 2.0
    • 1997 HTML 3.2
    • 1999 HTML 4.01
    • 2000 XHTML 1.0
    • 2012 HTML5
    • 2013 XHTML5
  13. <!DOCTYPE> Declaration
    • Helps the browser to display the web page correctly
    • Can only display the HTML page 100% correctly if it knows the HTML type and version used.
  14. Common <!DOCTYPE> Declarations
    • HTML5
    • <!DOCTYPE html>
    • HTML 4.01
    • <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    • XHTML 1.0
    • <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">