Presentation is loading. Please wait.

Presentation is loading. Please wait.

Semantic markup Library and Information Services University of St Andrews.

Similar presentations


Presentation on theme: "Semantic markup Library and Information Services University of St Andrews."— Presentation transcript:

1 Semantic markup Library and Information Services University of St Andrews

2 1. XHTML a reformulation of HTML 4 in XML 1.0 Specification: http://www.w3.org/TR/xhtml1/http://www.w3.org/TR/xhtml1/

3 Some differences to HTML 4 Documents must be well-formed Correct: here is an emphasized paragraph. Incorrect: here is an emphasized paragraph.

4 Element and attribute names must be in lower case XHTML is case sensitive -> and are different tags

5 For non-empty elements, end tags are required Correct: This is the first paragraph. This is the second paragraph. Incorrect: This is the first paragraph. This is the second paragraph.

6 Attribute values must always be quoted Correct: Incorrect:

7 Empty elements Correct:,, … Incorrect:,, …

8 The elements with 'id' and 'name' attributes HTML 4: “name” attribute for a, applet, form, frame, iframe, img, and map Introduction of “id” attribute XHTML 1.0: “name” attribute is deprecated and will be removed in subsequent versions

9 Versions of XHTML XHTML 1.0 Frameset For web sites using frames XHTML 1.0 Transitional Takes advantage of XHTML features but ensures backwards compatibility XHTML 1.0. Strict Ensures clean structural markup free from markup associated with layout XHMTL 1.1. (strict only) In preparation XHTML 2.0

10 Document Type Definitions (DTD) XHTML 1.0 Strict XHTML 1.0 Transitional HTML 3.02

11 XML namespaces register a unique identifier for a particular XML vocabulary provide a means of differentiation between tags from different XML vocabularies that happen to share the same name The XHTML namespace

12 2. Semantic markup Markup that is meaningful to the context of the document and its purpose At Lulworth Cove a Century Back HAD I but lived a hundred years ago I might have gone, as I have gone this year, By Warmwell Cross on to a Cove I know, And Time have placed his finger on me there:

13 Example: XML Thomas Hardy Far from the Madding Crowd London Smith, Elder & Co. 1874 Fiction 2 vols.

14 Example: XHTML Thomas Hardy. Far from the Madding Crowd. London : Smith, Elder & Co., 1874. Fiction ( 2 vols. )

15

16 Cascading Style Sheets Part 2 Library and Information Services University of St Andrews

17 What’s next? 1. Convert the file wb.html into XHTML. 2. Develop a markup that is similar to that in the example given in the presentation and a corresponding style sheet. 3. Open the file wessex.html and develop your own semantic markup (e.g. real names, names of fictional characters, titles of Hardy’s works, real places, fictional places, etc.) and style sheet.


Download ppt "Semantic markup Library and Information Services University of St Andrews."

Similar presentations


Ads by Google