------------------------------------------------------------------------------
MC logo
Ch. 4: HTML
[^] Chapter Outlines
------------------------------------------------------------------------------
<<Ch. 3: Networking Ch. 5: Web Searching>>
  1. HTML = HyperText Markup Language.
  2. Plain text is simply formatted. Example: Source, Page
  3. Basic markup
    1. Most tags have start and end versions enclosing text.
      <tag> . . . </tag>.
    2. Tags are case-insensitive.
    3. Spaces and line breaks are ignored; indenting does not matter.
    4. The contents of the file should be enclosed in <html> tags.
    5. Within the <html> pair should be <head> and <body> pairs.
    6. The <title> is displayed on the browser stripe.
    7. <p>, <i>, <b>, <tt>.
    8. The browser has great freedom formatting HTML
    9. Example: Source, Page
  4. Headings: <h1>, <h2>, <h3>.
  5. Entities.
    1. Starts with &.
    2. Stuff that's markup otherwise: Say &lt; for <
    3. Stuff not on the keyboard.
      1. &ouml; for ö.
      2. &divide; for ÷.
      3. &lambda; for λ.
      4. A partial list of the major ones.
      5. A rather complete list.
    4. Example: Source, Page
  6. Attributes
    1. Specified inside the opening tag.
    2. name=“value”
    3. Modify the behavior of the tag.
    4. Example: Source, Page
  7. Links
    1. This is the hyper in hypertext: Links take you somewhere else when clicked.
    2. <a href="URL">displayed text<a></a>
    3. Displays the text; clicking takes you to the URL
    4. Links may be absolute or relative.
      1. Absolute: A full URL, starting with the protocol.
      2. Relative: A partial URL starting from referring page.
      3. Use .. to go up.
    5. Example: Source, Page
  8. Images.
    1. <img src="URL">
    2. Image stored in a separate file.
    3. Formats: GIF, JPEG, others.
    4. Inserted as a particularly large character.
    5. No <img></img>.
    6. Example: Source, Page
  9. Colors.
    1. Sixteen pre-defined colors.
      black   silver   white   gray  
      red   fuchsia   maroon   purple  
      blue   navy   aqua   teal  
      lime   green   yellow   olive  
    2. Numeric colors
      1. Specify intensities for each red, blue and green, 0-255.
      2. Specify a hex number 00-FF (see p. 106).
      #FFFFFF   #000000   #999999   #00FF00  
      #0000FF   #FFFF00   #FF7F07   #9C07FF  
      #77A361   #66065A   #6DBFA7   #8B9174  
    3. Uses
      1. bgcolor=
      2. <font color="color">
      3. <body text=> <body link=>
      4. More...
    4. Example: Source, Page
  10. Lists.
    1. <ul> for un-ordered (bullet) lists.
    2. <ol> for ordered (numbered) lists.
    3. List members denoted with <li>.
    4. Use <dl> for definitions. Contents are <dt> and <dd>.
    5. Example: Source, Page
  11. Tables
    1. Enclose in <table>.
    2. Tables a sequence of <tr>.
    3. Rows a sequence of <td>.
    4. Various attributes.
    5. Example: Source, Page
<<Ch. 3: Networking Ch. 5: Web Searching>>