Sunteți pe pagina 1din 7

Lesson 1: Understanding Security Layers

Multiple Choice
1. What is the primary language used to create web pages?
a) HTML
b) XML
c) C#
d) Visual Basic
Answer: a
Difficulty: Easy
Section Reference: Customizing the Layout and Appearance of a Web Page
Explanation: HyperText Markup Language (HTML) is based on the standards presented by the
World Wide Web Consortium. HTML provides the basic building blocks of web pages.
2. What tool do you use to ensure that web pages follow a specified markup language standard?
a) element writer
b) DocType
c) DTD
d) XHTML
Answer: b
Difficulty: Medium
Section Reference: Using the Latest Standards of HTML
Explanation: Document Type Definition (DTD) is a developer tool used to ensure that web pages
follow a specified markup language. Web pages are tested against these standards during
development. If the developer wants a page to follow all XHTML standards, the word Strict is
placed in a declaration statement on the web page.
3. What declaration statement establishes the XHTML document as strict, transitional, and
frameset?
a) <DTD>
b) <xhtmll>
c) <meta http>
d) <!DOCTYPE>
Answer: d
Difficulty: Medium
Section Reference: Using the Latest Standards of HTML
Explanation: <!DOCTYPE> is the declaration statement that uses the three words described above:
strict, transitional, and frameset. Although it looks like a tag, it is not. In addition to the level of
strictness, it includes other information such as whether the page is using HTML or XHTML, the
version of the markup language being used, and the location of the W3.org website containing
the DTD.

4. What is used to create elements in an XHTML structure?


a) tag
b) CSS
c) selector
d) style
Answer: a
Difficulty:
Section Reference:
Explanation: An element is the name of an XHTML structure; tags are used to create them.
XHTML requires that every element started with a tag also ends with a tag. The symbol used to
end, or close, an element is a slash. It can be placed either within a separate ending tag or
included at the end of the content within the starting tag.
5. What is HTML coding technique allows you to use the attribute name without its value when
the attributes name is the same as the attributes value?
a) child element
b) attribute minimization
c) self element
d) tag reuse
Answer: b
Difficulty: Medium
Section Reference: Writing HTML
Explanation: Attribute minimization is an HTML coding technique that allows you to use the
attribute name without writing its value when the attributes name is the same as its value. This
practice is not allowed in XHTML.
6. Which of the following is not a commonly used element on web pages?
a) <head>
b) <title>
c) <body>
d) <text>
Answer: d
Difficulty: Easy
Section Reference: Writing HTML
Explanation: The HTML language commonly uses the <html>, <head>, <title>, and <body>
elements in web pages, and all of them are required for XHTML. The <html> element is the
required root element of an XHTML page. All nested elements within the <html> starting and
ending tags are called child elements. Nesting a new element with one of the child elements
makes the new element a child of that element and the grandchild of the <html> element.
7. What attribute is required for XHTML?
a) xmlns
b) content

c) xml
d) xhtml
Answer: a
Difficulty: Medium
Section Reference: Writing HTML
Explanation: The <html> element has a required XHTML attribute called xmlns. This attribute
specifies the namespace for the document, which ensures that elements having the same name
are uniquely identified.
8. What do you use to display HTML elements including fonts, borders, color, size, and so forth
with todays web pages?
a) XUL
b) SVG
c) CSS
d) MIME
Answer: c
Difficulty: Medium
Section Reference: Applying Cascading Style Sheets to a Web Page
Explanation: HTML elements define what content is to be displayed. Cascading Style Sheets
(CSS) define how to display these HTML elements, including such characteristics as fonts,
borders, color, size, and so on. Although many HTML elements and attributes already can do
this, they have fallen out of favor and certainly out of the XHTML standards; they have been
replaced by CSS.
9. What tag starts a table row?
a) <table>
b) <row>
c) <tr>
d) <table row>
Answer: c
Difficulty: Medium
Section Reference: Creating HTML Tables
Explanation: To define a table using HTML, use the <table> and </table> tags. Each row is
defined within the <table>...</table> tags with <tr> and </tr> tabs.
10. What framework, developed by Microsoft, allows programmers to build dynamic websites,
web applications, and web services?
a) BASIC language
b) C++
c) ASP.NET
d) Java
Answer: c

Difficulty: Easy
Section Reference: Understanding ASP.NET Intrinsic Objects
Explanation: ASP.NET is a web application framework that allows programmers to build
dynamic websites, web applications, and web services. ASP.NET is built on the Common
Language Runtime (CLR), allowing programmers to write ASP.NET code using any
supported .NET language.
11. What programming platform, recommended by Microsoft, provides a comprehensive
integrated development environment that allows you to use visual objects such as labels and
buttons?
a) Turbo Studio
b) .NET Framework Programmer
c) ASP.NET Developer
d) Visual Studio
Answer: c
Difficulty: Medium
Section Reference: Writing Web Pages in Microsoft Visual Web Developer 2008 Express
Explanation: Visual Studio has one of the most comprehensive integrated development
environments (IDEs) available today. It includes Visual Web Developer, which enables visual
objects, such as labels and buttons, to be directly placed on web pages. These objects can then be
programmed in familiar programming languages such as C# or Visual Basic (VB). Although this
IDE uses HTML and ASP code in the background, the web page looks and feels like a desktop
environment.
12. Which of the following are used to divide the thousands of classes in ASP.NET so that they
are organized and retrieved more efficiently?
a) objects
b) definitions
c) collections
d) namespace
Answer: d
Difficulty: Medium
Section Reference: Exploring Intrinsic Objects
Explanation: Most objects available to ASP.NET are not displayed on web pages but are found
under the namespace hierarchy. Namespaces are abstract containers used to identify groups of
names that represent everything ASP.NET needs to create web pages. This includes classes,
objects, properties, methods, and even other namespaces. The primary purpose of namespaces is
to reduce ambiguity among all the names used in the .NET platform.
13. Which namespace includes HttpContext, HttpRequest, and HttpResponses?
a) Default
b) System.Web
c) Http
d) Standard

Answer: b
Difficulty: Hard
Section Reference: Exploring Intrinsic Objects
Explanation: The System namespace contains the classes and interfaces that facilitate client
server communication. The System.Web namespace includes the HttpContext, HttpRequest,
HttpResponse, and the HttpServerUtility classes that carry information about page contents,
request for a page, page transmission, and access to server-side utilities to process page content
and user requests. The System.Web namespace also includes other classes for managing cookies,
file transfers, and output control.
14. What component in Visual Studio allows you make language references easily accessible by
providing autocompletion and giving quick access to documentation?
a) IntelliSense
b) IDE
c) COM
d) DCOM
Answer: a
Difficulty: Hard
Section Reference: Exploring Intrinsic Objects
Explanation: IntelliSense is Microsoft's implementation of autocompletion that completes the
symbol names the programmer types. It also serves as documentation and disambiguation for
variable names, functions, and methods using reflection.
15. Which of the following objects does HttpContext contain, not counting intrinsic objects?
a) Defined
b) Current
c) Saved
d) Server
Answer: b
Difficulty: Hard
Section Reference: Exploring Intrinsic Objects
Explanation: HttpContext contains several methods but only one object, Current. This object is
tied to all HTTP-specific information regarding page requests and facilitates getting or setting all
HTTP requests.
16. Which of the following is not an intrinsic object included within HttpContext?
a) Response
b) Request
c) Client
d) Session
Answer: c
Difficulty: Medium

Section Reference: Using HttpContext Objects


Explanation: The HttpContext objects commonly referred to as intrinsic are Response,
Request, Server, Application, and Session.
17. Which top-level object in the HttpContext Current object is used to redirect the browser to
another page?
a) Response
b) Request
c) Session
d) Server
Answer: a
Difficulty: Hard
Section Reference: Using HttpContext Objects
Explanation: The top-level Response object in the HttpContext.Current object contains
properties and methods relating to browser output. The two most popular uses of this object are
to write text directly to the web page with the Response.Write method and to redirect the
browser to another page with the Response.Redirect method.
18. Which top-level object of HttpContext Current contains properties and methods related
individual users or instances of a website?
a) Response
b) Request
c) Session
d) Server
Answer: c
Difficulty: Hard
Section Reference: Using HttpContext Objects
Explanation: The top-level Session object in the Httpcontext.Current object contains
properties and methods related to individual users or instances of a website. It can be used to
easily retrieve information about your application.
Fill in the Blank
19. To prevent the entire page from being reloaded each time, ASP.NET includes several
methods for saving the ___________ of the page between requests.
Answer: state
Difficulty: Hard
Section Reference: Understanding How State is Stored and the Different Types of State
Explanation: Unlike desktop applications, the stateless protocol is addressed by maintaining an
ongoing dialog between the browser and server. ASP.NET includes several methods for saving
the page state between requests.
Short Answer

20. What code is used to embed the user.jpg file in the <body> element in HTML?
Answer: <img src="user.jpg"/>
Difficulty: Medium
Section Reference: Embedding Images with HTML
Explanation: The image element <img> is used in most Web pages along with the src attribute
(which points to the name of the image). However, many of these pages will not pass XHTML
validation. We will begin by using the bare minimum to place an image on the page. Once we
can see the image, we will try to validate the page.

S-ar putea să vă placă și