210 likes | 230 Views
Understanding Basic HTML. Amanda Regan Technical Director June, 2008. What is HTML?. H yper t ext M arkup L anguage Used to create Web pages Easy to understand and write. What is HTML?. Implemented by elements, which: Control structure and behavior Are not case sensitive
E N D
Understanding Basic HTML Amanda Regan Technical Director June, 2008
What is HTML? • Hypertext Markup Language • Used to create Web pages • Easy to understand and write
What is HTML? • Implemented by elements, which: • Control structure and behavior • Are not case sensitive • Generally consist of three parts: • Start tag, such as <BODY> • Content • End tag, such as </BODY> • May have assigned attributes • <BODY align=“center”>
What is HTML? • Root element HTML contains all other elements. • HTML documents consist of two basic parts: • Header section (HEAD element) • Contains information about the document • Must include a TITLE element • Body • Contains document’s actual content • BODY element, or • FRAMESET element
The HEAD Element • TITLE – required; displayed on browser’s top bar • BASE – specifies base pathname for all URLs • META – provides additional information about the document • SCRIPT – places a script inside the document
The SPAN Element • Identifies a generic inline element, such as informational text. • To generate a SPAN element:
The IMG Element • Places an image on the page. • The src attribute is required. • To generate an IMG element:
Specifying Styles • Three ways to insert a CSS stylesheet: • External Style Sheet – used when the style is applied to many pages. Each page must link to the style sheet using the <link> tag, which goes inside the head section. • Internal Style Sheet – used when a single document has a unique style. You define internal styles in the head section with the <style> tag. • Inline Styles – used when a unique style is to be applied to a single occurrence of an element. The style attribute is placed inside the relevant tag, and it can contain any CSS property.
The style Attribute • Specifies properties for an inline stylesheet.
The INPUT Element • Creates a variety of form input controls. • Type of control defined by the type attribute. • Default is text input. • From the Insert menu:
The IFRAME Element • Defines an inline frame within a document used for embedding an HTML document in a Web page. • Displays the content of an external document; may display scrolling devices. • From the toolbar:
The IFRAME Element (continued) • For example, specifying this frame property . . .
The IFRAME Element (continued) • . . . produces this HTML code:
The TABLE Element • Indicates a table. • Minimum elements are tr (table row) and td (table cells). • From the Insert menu:
The FORM Element • Contains controls for collecting user input. • The action attribute (required) specifies the URL of the program that will process the form. • From the toolbar:
The FIELDSET Element • Groups related form controls and labels. • From the toolbar:
The SELECT Element • Defines a multiple choice menu or a scrolling list box. • From the toolbar:
Putting It All Together • Demo: build a simple launch page
And finally . . . • Questions?