Docsity

Slides for HTML | Object Oriented Programming II | CMSC 132, Study notes of Computer Science

Partial preview of the text

Download Slides for HTML | Object Oriented Programming II | CMSC 132 and more Study notes Computer Science in PDF only on Docsity!

๏‚— Language used to define web pages.

๏‚— What the server sends to the browser.

๏‚— Browser reads HTML and renders the page

๏‚— May require downloading data from server (e.g., images)

  • HTML - HyperText Markup Language
  • HTML Standard
    • Developed by the World Wide Web Consortium (W3C)
    • http://www.w3.org
  • Document is described through a series of commands and directives

present in a text file.

  • HTML goal is to describe structure only. Presentation should be left to cascading style sheets.
  • When interpreted by an HTML viewer those commands determine the appearance of the page
  • HTML documents are entirely ASCII text.
  • Commands are explicitly inserted.
  • Great HTML/CSS tutorial site:
    • http://www.htmldog.com/
  • An html document has two main parts.
    • Header โ€“ provides information about the document.
    • Body โ€“ contents of the page.
  • Example 1 (BasicFrame.html)

Template

  • Letโ€™s validate the above document
  • Tag
    • Specifies a command or directive.
    • It surrounds content and apply meaning to that content
  • General format:

< elementName attributes >

  • Most HTML elements have two tags:
    • Start tag and end tag
    • Example: text
  • Tags and attributes will be in lowercase (XHTML requirement).
  • Some tags are self-closed (ending them in />)


  • An attribute extends or modifies a tag.
  • Attributes
    • Only appear in the start tag.
    • You can have several attributes in one tag each separated by spaces.
    • Order is immaterial.
    • Some take values which are specified after an =
  • General format
    • Displayed Text
  • Example
  • All attribute values will be enclosed in โ€œ โ€œ for XHTML compliance.