Name: 
 

Tutorial 9



True/False
Indicate whether the statement is true or false.
 

 1. 

While powerful, SGML is also quite simple.
 

 2. 

SGML is most useful for creating applications that apply to specific types of documents.
 

 3. 

Creating Web sites with HTML is a complicated process that requires a programming background.
 

 4. 

All of the extensions from Netscape and Internet Explorer were eventually adopted by the W3C.
 

 5. 

HTML cannot be applied inconsistently, because of strict DTDs required by the language.
 

 6. 

Web designers have long been able to easily create Web sites without taking into account the cross-browser compatibility of the Web page code.
 

 7. 

By making allowances for inconsistently applied HTML code, the source code for the browser must be larger and more complex to deal with all contingencies.
 

 8. 

As the Web has branched out in recent years, it has grown to include smaller, handheld devices, which limit the size of the software that can be run on them.
 

 9. 

An XML author can create a collection of elements and attributes for special types of data.
 

 10. 

Individual users cannot create their own XML documents.
 

 11. 

An XML document that employs the correct syntax is known as a well-made document.
 

 12. 

In HTML, browsers usually reject documents that violate HTML syntax.
 

 13. 

XML parsers reject any XML documents that are not well-formed.
 

 14. 

The next version of XHTML is expected to remain similar to XHTML 1.1, but it may be altered to conform to the requirements of related XML standards such as XML Linking and XML Schema.
 

 15. 

It is highly unlikely that documents written in XHTML 2.0 will not be backward-compatible with earlier versions.
 

 16. 

The development of XHTML 2.0 will likely require the development of new XHTML modules, or revisions to existing XHTML modules.
 

 17. 

XHTML allows some instances of attribute minimization.
 

 18. 

Deprecated attributes are allowed under the strict DTD.
 

 19. 

All XML parsers assume UTF-8 or UTF-16 by default if no encoding is specified.
 

 20. 

The namespace id for XHTML is a URL.
 

 21. 

XHTML documents without namespaces are not interpretable by most browsers.
 

 22. 

When a validator reports that the end tag for an element is missing, it always means that a two-sided tag is missing an end tag.
 

 23. 

Once you have a document that passes the validation test, you may want to make a note of this on your Web page.
 

 24. 

The content of an embedded style sheet is treated as CDATA.
 

 25. 

All browsers recognize and understand CDATA sections.
 

 26. 

In converting old HTML to XHTML, you should include an xml declaration in the last line of your file so that your document can be accessed by XML parsers.
 

 27. 

Adding a DOCTYPE declaration for one of the XHTML DTDs and check your document for well-formedness and validity whenever you make a change to the code.
 

 28. 

When converting old HTML code to XHTML, add the XHTML local namespace to the html element of your document.
 

 29. 

When converting old HTML code to XHTML, make sure that all inline images contain the target attribute.
 

Modified True/False
Indicate whether the statement is true or false.  If false, change the identified word or phrase to make the statement true.
 

 30. 

SGML is device-dependent. _________________________

 

 31. 

HTML is limited to those organizations that can afford the cost and overhead of maintaining large environments for programming in that language. _________________________

 

 32. 

The success of the Web is due in no small part to XML, which has allowed Web authors to easily create documents that can be displayed across different operating systems. ______________________________

 

 33. 

The following HTML code would likely be interpreted correctly by a browser even though the colspan attribute value is not enclosed in brackets: <td colspan=2>Heading</td>. _________________________

 

 34. 

Unlike SGML, XML can be used to design markup languages for different types of structured documents. _________________________

 

 35. 

HTML has been used to create several markup languages, including MathML and CML. _________________________

 

 36. 

Documents written in MathML and CML are also HTML documents. _________________________

 

 37. 

XHTML 1.0 duplicates much of the content and structure of HTML 3.0, reformulated in XML. _________________________

 

 38. 

The strict DTD is best used for older documents that contain deprecated features. _________________________

 

 39. 

The frameset DTD is best used for documents that need to strictly conform to the latest XHTML standards. _________________________

 

 40. 

XHTML 2.0 is a restructuring of XHTML 1.0 in which different elements are placed within modules. _________________________

 

 41. 

Each XHTML module has its own corresponding schema. _________________________

 

 42. 

The strict DTD prohibits certain elements from being used as parents within other elements. _________________________

 

 43. 

Although the xml declaration is not required, you should always include it in any XML or XHTML document. _________________________

 

 44. 

A namespace id can be any string of characters so long as it uniquely identifies the document namespace. _________________________

 

 45. 

The W3C requires that the XHTML namespace be added to the html element to avoid any possible confusion in the future when mixed documents become more prevalent. _________________________

 

 46. 

When converting old HTML code to XHTML, make sure that all element and attribute names are in uppercase letters. _________________________

 

 47. 

When converting old HTML code to XHTML, make sure that all empty elements are entered as two-sided tags. ______________________

 

 48. 

When converting old HTML code to XHTML, make sure to replace the background attribute with the background-image style. _________________________

 

Multiple Choice
Identify the choice that best completes the statement or answers the question.
 

 49. 

____ is a meta-language used to create markup languages.
a.
SGML
b.
HTML
c.
XML
d.
XHTML
 

 50. 

The most famous SGML application is ____.
a.
XHTML
b.
HTML
c.
XML
d.
Java
 

 51. 

Microsoft introduced the ____ element into its browser when it saw a need for internal frames.
a.
frame
b.
frameset
c.
iframe
d.
exframe
 

 52. 

____ was designed to be a minor version of SGML, without SGML’s complexity and overhead.
a.
XML
b.
XHTML
c.
HTML
d.
XSL
 

 53. 

Documents written in MathML and CML are ____ documents.
a.
XHTML
b.
HTML
c.
XSL
d.
XML
 

 54. 

XML documents must be evaluated with an XML ____.
a.
compiler
b.
executor
c.
parser
d.
matrix
 

 55. 

To specify what the correct content and structure for a document should be, the document developers create a collection of rules called the ____.
a.
XSL
b.
parser
c.
DTD
d.
schema
 

 56. 

XHTML ____ is a reduced version of XHTML 1.1 geared toward mobile applications.
a.
1.2
b.
Basic
c.
Mobile
d.
2.0
 

 57. 

The specifications for XHTML 1.0 most closely match those for HTML _____.
a.
2.0
b.
3.0
c.
4.0
d.
4.01
 

 58. 

The most widely supported version of XHTML is XHTML ____.
a.
1.0
b.
Basic
c.
1.1
d.
2.0
 

 59. 

____ DTDs are associated with XHTML 1.0.
a.
Two
b.
Three
c.
Four
d.
Six
 

 60. 

The ____ DTD supports many of the presentational features of HTML.
a.
presentational
b.
strict
c.
transitional
d.
deprecated
 

 61. 

The ____ DTD includes the deprecated elements and attributes of HTML.
a.
presentational
b.
transitional
c.
deprecated
d.
strict
 

 62. 

The ____ DTD does not allow any presentational features or deprecated HTML elements and attributes.
a.
transitional
b.
frameset
c.
strict
d.
basic
 

 63. 

The ____ DTD does not support frames or inline frames.
a.
frameset
b.
basic
c.
strict
d.
main
 

 64. 

XHTML version _____ is still in the development process.
a.
2005
b.
3.0
c.
2.0
d.
2.1
 

 65. 

The ____ module is used for links.
a.
Links
b.
Forms
c.
Hypertext
d.
Structure
 

 66. 

The ____ module is used for deprecated elements and attributes.
a.
Structure
b.
Legacy
c.
Metainformation
d.
Presentation
 

 67. 

In HTML, which of the following are examples of attribute minimization?
a.
disabled
b.
multiple
c.
noresize
d.
All of the above
 

 68. 

Which of the following are allowed under the strict DTD?
a.
basefont
b.
menu
c.
u
d.
None of the above
 

 69. 

The code <font color=“red”>Hi</font> would not be considered valid code under the ____ DTD.
a.
transitional
b.
frameset
c.
strict
d.
main
 

 70. 

Any XML document that omits the ____ element is rejected.
a.
form
b.
link
c.
title
d.
a
 

 71. 

The strict DTD requires the use of the ____ attribute in place of the name attribute.
a.
caption
b.
id
c.
object
d.
link
 

 72. 

The target attribute is a prohibited attribute of the ____ element, in the strict DTD.
a.
body
b.
br
c.
caption
d.
a
 

 73. 

The clear attribute is a prohibited attribute of the ____ element, in the strict DTD.
a.
body
b.
br
c.
caption
d.
a
 

 74. 

The bgcolor attribute is a prohibited attribute of the ____ element, in the strict DTD.
a.
ul
b.
br
c.
tr
d.
a
 

 75. 

The action attribute is a required attribute of the ____ element.
a.
bdo
b.
form
c.
area
d.
textarea
 

 76. 

The alt attribute is a required attribute of the ____ element.
a.
style
b.
param
c.
area
d.
img
 

 77. 

____ is a more complete standard than ASCII.
a.
EBCDIC
b.
Unicode
c.
Cyrllic
d.
Roman
 

 78. 

____ characters are transmitted as a sequence of 8-bit and 16-bit values in the process of character encoding.
a.
ASCII
b.
EBCDIC
c.
Unicode
d.
Text-based
 

 79. 

Each XML document is based on a(n) ____ set.
a.
indexed
b.
binary
c.
unary
d.
character
 

 80. 

The standalone attribute should be set to ____ for XHTML document, because these documents rely on the external strict, transitional, or frameset DTDs supplied by the W3C for validation.
a.
yes
b.
no
c.
reset
d.
empty
 

 81. 

The standalone attribute value should be set to ____ for XML documents in which the DTD is either not present, or placed within the XML document itself.
a.
yes
b.
no
c.
empty
d.
reset
 

 82. 

In the syntax of the DOCTYPE declaration for a general XML document, the type attribute identifies the type of ____.
a.
schema
b.
root
c.
DTD
d.
index
 

 83. 

____ is used for documents containing mathematical content, symbols, equations, and operations.
a.
XHTML
b.
CML
c.
MathML
d.
Equex
 

 84. 

To declare a(n) ____ namespace, you use the syntax <root xmlns=“namespace”>.
a.
local
b.
default
c.
indexed
d.
main
 

 85. 

A ____ namespace only applies to select elements.
a.
selected
b.
default
c.
local
d.
global
 

 86. 

Each of the elements in the ____ namespace is marked by a prefix attached to the element name.
a.
global
b.
default
c.
local
d.
value
 

 87. 

To create a(n) ____ namespace, you add the following attribute to a document’s root element: xmlns:prefix=“namespace” where prefix is the prefix you’ll use to mark elements in this local namespace and namespace is the namespace id.
a.
global
b.
default
c.
local
d.
main
 

 88. 

In PCDATA, you cannot enter ____ into a document as text because it is used to process information.
a.
@
b.
&
c.
.
d.
All of the above
 

 89. 

The ____ symbol is used to mark the beginning of an element tag.
a.
>
b.
<
c.
&
d.
;
 

 90. 

The ____ symbol is used to indicate a special character.
a.
*
b.
$
c.
#
d.
&
 

 91. 

If you want to display a < symbol in your document, you have to use the special character symbol ____.
a.
&lt;
b.
&gt;
c.
&>;
d.
>>;
 

 92. 

In ____ you can use any character you like without worrying about it being misinterpreted.
a.
PCDATA
b.
CDATA
c.
MAINDATA
d.
PDATA
 

 93. 

Parsers and browsers essentially ignore ____.
a.
PCDATA
b.
MAINDATA
c.
EDATA
d.
CDATA
 

 94. 

When converting old HTML code to XHTML, make sure that attribute values are placed in ____.
a.
quotes
b.
parentheses
c.
brackets
d.
commas
 

 95. 

When converting old HTML code to XHTML, pay specific attention to the ____ element, which often does not have closing tags.
a.
td
b.
p
c.
table
d.
tr
 

 96. 

When converting old HTML code to XHTML, make sure that all inline images contain the ____ attribute.
a.
target
b.
a
c.
alt
d.
src
 

 97. 

When converting old HTML code to XHTML, make sure to replace the ____ attribute with the background-color style.
a.
background
b.
bgcolor
c.
back
d.
body
 

 98. 

When converting old HTML code to XHTML, make sure to replace the use of the font element with either the ____ element or with a style that applies the same formatting specified by the font element.
a.
div
b.
color
c.
span
d.
format
 

Completion
Complete each statement.
 

 99. 

SGML stands for ___________________________________.
 

 

 100. 

XML stands for ______________________________.
 

 

 101. 

A(n) ____________________ is a program that checks the XML document for errors in syntax and content.
 

 

 102. 

An XML document that employs the correct syntax is known as a(n) ____________________ document.
 

 

 103. 

A well-formed XML document that also contains the correct content and structure is known as a(n) ____________________ document.
 

 

 104. 

DTD stands for ____________________.
 

 

 105. 

The ____________________ DTD is used for documents containing frames.
 

 

 106. 

The process by which characters (represented as a series of bytes) are transmitted over the Internet is known as character ____________________.
 

 

 107. 

UCS stands for ______________________________.
 

 

 108. 

A(n) ____________________ is a set of abstract symbols matched to code numbers.
 

 

 109. 

A(n) ____________________ is a unique identifier for the elements and attributes originating from a particular document type, such as XHTML and MathML.
 

 

 110. 

A(n) ____________________ namespace is the namespace applied to the root element and any element within it.
 

 

 111. 

To define a namespace for specific parts of a document, you use a(n) ____________________ namespace.
 

 

 112. 

____________________ character data is text that is not processed by the browser or parser.
 

 

 113. 

CDATA is another term for ______________________________.
 

 

 114. 

One way of dealing with the PCDATA problem is to use a special construct called a CDATA ____________________, which marks a block of text as CDATA.
 

 

 115. 

When converting old HTML code to XHTML, make sure to replace the align attribute with the ____________________ or text-align style.
 

 

 116. 

When converting old HTML code to XHTML, make sure to fix all instances of attribute _____________________.
 

 

 117. 

When converting old HTML code to XHTML, make sure to replace the use of the width attribute in the td or th element with the width ______________________.
 

 

Matching
 
 
Identify the letter of the choice that best matches the phrase or definition.
a.
SGML
e.
XHTML
b.
HTML
f.
CDATA
c.
XML
g.
Unicode
d.
DTD
h.
W3C
 

 118. 

It allows Web authors to easily create documents that can be displayed across different operating systems
 

 119. 

Its most widely supported version is 1.0
 

 120. 

Adopted many browser extensions into the official HTML specifications
 

 121. 

Its documents are evaluated with a program that checks the document for errors in syntax and content
 

 122. 

A more complete character set than ASCII
 

 123. 

Text that is not processed by the browser or parser
 

 124. 

Its use is limited to those organizations that can afford the cost and overhead of maintaining its applications
 

 125. 

A collection of rules
 

Short Answer
 

 126. 

What is the reason for restructuring XHTML 1.0 into modules in XHTML 1.1?
 

 127. 

What is attribute minimization?
 

 128. 

For an XHTML document to be well-formed, what is the problem with the following syntax, and how would you fix it?

<P>This is a paragraph.</P>
 

 129. 

For an XHTML document to be well-formed, what is the problem with the following syntax, and how would you fix it?

<p>This text is <b>bold.</p></b>
 

 130. 

For an XHTML document to be well-formed, what is the problem with the following syntax, and how would you fix it?

<p>Paragraph 1.
<p>Paragraph 2.
 

 131. 

For an XHTML document to be well-formed, what is the problem with the following syntax, and how would you fix it?

This is a line break<br>
 

 132. 

For an XHTML document to be well-formed, what is the problem with the following syntax, and how would you fix it?

<td ALIGN=“right”>
 

 133. 

For an XHTML document to be well-formed, what is the problem with the following syntax, and how would you fix it?

<table width=620>
 

 134. 

For an XHTML document to be well-formed, what is the problem with the following syntax, and how would you fix it?

<option selected>
 

 135. 

How would you change this code to make it well formed in XHTML?

<input type=“radio” checked>
 

 136. 

Would the following code be allowed under the strict DTD? Why or why not?

<body>
  <img src=“logo.jpg” alt=“Wizard Works” />
</body>
 

 137. 

All DTDs require that certain elements be present in every valid XHTML document. What are they?
 

 138. 

Rewrite this code as strict-DTD-compliant code:

<body>
  <img src=“logo.jpg” alt=“Wizard Works” />
</body>
 

 139. 

Why isn’t this code valid under the strict DTD?

<img src=“logo.jpg” alt=“Wizard” align=“left” />
 

 140. 

How would you make this code valid under all DTDs?

<img src=“logo.jpg” alt=“Wizard” align=“left” />
 

 141. 

What is the biggest advantage of the use of DTDs?
 

 142. 

What is the syntax of the XML declaration?
 

 143. 

What is the syntax for indicating the character set and encoding employed by your HTML document?
 

 144. 

When the validator reports that the end tag for an element is missing, what does this indicate?
 

 145. 

What is the syntax of the CDATA section?
 

Essay
 

 146. 

There are two main, significant problems with HTML. Explain both of these.
 

 147. 

Describe the DTDs associated with XHTML 1.0.
 

 148. 

List seven of the elements that are not allowed under the strict DTD.
 

 149. 

How is the content of embedded style sheets affected by the DTDs for XML and XHTML? What is one means of dealing with this problem? What is a problem with this solution?
 

 150. 

Provide eight tips for converting old HTML code to XHTML.
 



 
Check Your Work     Start Over