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 1 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 2 Three versions of HTML HMTL 4 01 Strict excludes deprecated tags and attributes HTML 4 01 Transitional less restrictive including appearance elements HTML 4 01 Frameset identical to transitional but allows body to be replaced with frameset Web Standards Project www webstandards org Industry watchdog convincing web browsers developers to adhere to web standards HTML 4 01 is the last version for HTML Next version is XHTML 1 0 XHTML Uses same tags as HTML 4 01 Enforces rules like closing tags tags in lowercase and others We will be using XHTML strict HTML Validation http validator w3 org 3 An html document has two main parts Header provides information about the document Body contents of the page Example 1 BasicFrame html DOCTYPE html PUBLIC W3C DTD XHTML 1 0 Strict EN http www w3 org TR xhtml1 DTD xhtml1 strict dtd html xmlns http www w3 org 1999 xhtml lang en xml lang en head meta http equiv Content Type content text html charset ISO 8859 1 title Template title head body HTML CODE HERE body html Let s validate the above document 4 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 h1 text h1 Tags and attributes will be in lowercase XHTML requirement Some tags are self closed ending them in hr br meta img 5 head head It does not generate displayed contents Contains other tags e g title title title title Part of the header It is required Search engines depend on it 6 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 ELEM ATTR attrValue Displayed Text ELEM Example img src bear gif width 100 height 75 alt bear image All attribute values will be enclosed in for XHTML compliance 7
View Full Document
Unlocking...