Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 2 XHTML: Part II The Web Warrior Guide to Web Design Technologies.

Similar presentations


Presentation on theme: "Chapter 2 XHTML: Part II The Web Warrior Guide to Web Design Technologies."— Presentation transcript:

1 Chapter 2 XHTML: Part II The Web Warrior Guide to Web Design Technologies

2 Objectives In this chapter, you will: Work with text-formatting and phrase elements Add images to your Web pages Create lists Work with frames Create tables Build forms

3 Working with Text Two types of inline elements for managing text formatting are formatting elements and phrase elements. Formatting elements provide specific instructions as to how their contents should be displayed. –Examples of text-formatting elements:,,,, and

4 Working with Text Phrase elements primarily describe the content. –Examples of phrase elements:,,,, and. Special Characters: Special characters, like the copyright symbol, can be inserted into an XHTML document. Character entity references are used to insert special characters.

5 Working with Text Character entities contain a descriptive name preceded by an ampersand (&) and followed by a semicolon. –Example: © is used to insert the copyright symbol. Character entities are case-sensitive The character entity for an ampersand is &

6 Adding Images to Your Web Pages Images are added using the element. The src attribute specifies the file name of an image file. attributes: src, alt, longdesc, width, height, usemap, and ismap. The element must include the src attribute in order for an XHTML document to be well formed.

7 Adding Images to Your Web Pages The alt attribute specifies alternate text to display in place of the image file. If an element does not include a title attribute, the value assigned to the alt attribute appears as a ToolTip when the mouse is moved over the image. The size of an image is measured in pixels. Resolution is the number of pixels that can be displayed on a monitor.

8 Adding Images to Your Web Pages The height and the width attributes are used to specify the size of an image. The value assigned to the height and the width attributes in an element should always be the exact dimensions of the original image.

9 Creating Lists Three types of lists can be added to a Web page: –Unordered lists –Ordered lists –Definition lists

10 Creating Lists List elements and their description: Block-level element that creates an unordered list Block-level element that creates an ordered list Inline element that defines a list item Block-level element that creates a definition list Inline element that defines a definition list term Inline element that defines a definition list item

11 Creating Lists An unordered list is a list of bulleted items. The elements are nested within the elements as follows: list item 1 list item 2

12 Creating Lists An ordered list is a list of numbered items. elements are nested within the elements: Bill Clinton George Bush

13 Creating Lists A definition list is a list of terms and their definitions. Definition lists are created using the element. Within the element, elements are nested for term names and elements for term definitions.

14 Creating Lists Ohm Measurement unit for electrical resistance or impedance.

15 Working with Frames Frames are independent, scrollable portions of a Web browser window. Using frames, a Web browser window can be split into multiple windows. The Frameset DTD includes the and elements. A document is divided into frames using the element.

16 Working with Frames Use the rows and cols attributes to determine whether frames are created using rows or columns. The rows attribute determines the number of horizontal frames. The cols attribute determines the number of vertical frames. The asterisk allocates any remaining screen space to an individual frame.

17 Working with Frames The src attribute of the element specifies the URL to be opened in an individual frame. Frames can be assigned a name using the name attribute. This name can then be used as a target for a hyperlink. The target attribute of the element determines in which frame or Web browser window a URL opens.

18 Working with Frames The element is used to specify a default target for all links in a document, using the assigned name of a window or frame.

19 Creating tables Tables are collections of rows and columns that can be used to organize and display data. A cell is the intersection of a row and a column. Attributes of a table element: summary, width, border, frame, rules, cellspacing, and cellpadding.

20 Creating tables Table rows are created using the element. Cells are created within the element using the element. Header information is defined within the element.

21 Building Forms A form is used to collect information from the user and transmit that information to the server for processing. A form cannot be nested inside another form. Attributes of the form element include: action, method, and enctype. The enctype attribute specifies an encoding protocol known as MIME.

22 Building Forms Form controls include:,,, and. Attributes of the element include: alt, checked, maxlength, name, size, and src. Values of element’s type attribute: text, password, radio, checkbox, reset, button, submit, image, file, and hidden.

23 Building Forms To email form data to a Web server, replace the Web server script’s URL in the element’s action attribute with: mailto:email_address

24 Summary A user agent is a device that is capable of retrieving and processing XHTML. Character entities are used to add special characters to an XHTML document.

25 Summary Use the attribute to add images to a XHTML document. An unordered list is a list of bulleted items. An ordered list is a list of numbered items. A definition list is a list of terms and their definitions. Frames are independent scrollable portions of a Web browser window.

26 Summary Tables are collections of rows and columns that are used to organize and display data. Data on a form can be sent to an email address instead of being submitted to a Web server.


Download ppt "Chapter 2 XHTML: Part II The Web Warrior Guide to Web Design Technologies."

Similar presentations


Ads by Google