HTML Questions & Answers – HTTP Overview

This set of HTML Multiple Choice Questions & Answers (MCQs) focuses on “HTTP Overview”.

1. In OSI model USB lies under the layer ___________
a) data Link layer
b) physical layer
c) network layer
d) transport layer
View Answer

Answer: b
Explanation: There are seven layers namely Physical layer, data Link layer, network Layer, transport layer, session layer, presentation layer, and application layer. The physical layer is the first layer, it is used for transmitting electrical signal across the network. Examples are USB, Bluetooth or Ethernet.

2. IP is used in the level ___________
a) presentation layer
b) network layer
c) application layer
d) data Link layer
View Answer

Answer: b
Explanation: Network layer is the third layer, it deals with routing across complicated networks, Internet Protocol (IP) is very commonly used at this level. It is capable of traveling across multiple networks. It can also travel through intermediate devices like routers.

3. Which one is not the feature of HTTP protocol?
a) media independent
b) connectionless
c) responsive
d) stateless
View Answer

Answer: c
Explanation: There are basically three main features of HTTP protocol i.e HTTP is media independent, HTTP is connectionless and it is stateless also. Browser initiates HTTP request, and then client disconnects from the server.
advertisement
advertisement

4. Which of the following are not the valid character set in HTTP?
a) ISO-8859-1
b) US-ASCII
c) ISO-8859-7
d) ISO-8859-12
View Answer

Answer: d
Explanation: A character set must know to web browsers to display HTML pages correctly. For the preference of clients we use character sets for specifying characters. The default value is US-ASCII. The valid character sets are ISO-8859-1, US-ASCII or ISO-8859-7.

5. Which one is the correct syntax for specifying media type?
a) type ”/” subtype *( “;” parameter)
b) subtype ”/” type *(“;” parameter)
c) parameter “/” type *(“;” subtype)
d) (“;” subtype) “/” type *(parameter)
View Answer

Answer: a
Explanation: Internet media types are used in Content-Type and Accept header fields. Media types are registered with IANA (Internet Assigned Number Authority). The syntax for a media type is m-type = type “/” subtype *(“;” parameter). The name of subtype, type and parameter attribute all are case sensitive.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

6. Which header field defines meta information?
a) Request-header
b) Response-header
c) General-header
d) Entity-header
View Answer

Answer: d
Explanation: A HTTP header which does not relate to the content of message is a response-header. A request-header is used to provide information about request or response. Entity-header field defines meta information about the body. If the body is not present resource is identified by request. The general syntax for all the header fields is msg-header=field-name “:” [field-value]. General-header field is for both response and request.

7. Which of the following is not the request method?
a) Head
b) Get
c) Remove
d) Put
View Answer

Answer: c
Explanation: There are various request methods on the resource identified by Request-URI. Get, post, head, delete, trace, connect, put and options are some of the methods. For retrieving information from the server we use Get method.
advertisement

8. Which symbol is used when HTTP request does not apply to the particular source?
a) ‘&’
b) ‘*’
c) ‘#’
d) ‘@’
View Answer

Answer: b
Explanation: When HTTP request does not apply to particular resource ‘*’ is used. It is applied to the server itself. This is only allowed when the used method is not necessarily applied to the resource. E.g. OPTIONS * HTTP/1.1

9. Which of the following is not a request-header field?
a) Expect
b) Host
c) Delete
d) If-None-Match
View Answer

Answer: c
Explanation: For passing additional information about request we use request-header fields. These are also requested modifiers. There are several request-header fields like Accept-Encoding, Expect, Accept-Charset, Accept-Language, Form, Host, Authorization, If-Match, Proxy-Authorization, Range, User-Agent, TE, Referer, If-Unmodified-Since, If-Range.
advertisement

10. What does ‘3xx’ code denote?
a) Redirection
b) Server Error
c) Success
d) Informational
View Answer

Answer: a
Explanation: ‘3xx’ means Redirection, any further action have to be taken for completing the request. ‘1xx’ is for Informational, it signifies that the request was received and the process is going on. ‘2xx’ denotes Success, which signifies the action was successfully understood, received and accepted.

11. Which of the following is not a response-header field?
a) Location
b) Server
c) ETag
d) Referer
View Answer

Answer: d
Explanation: For passing additional information about the response that can’t be placed in Status-Line, we use response-header fields. Some of the fields are Age, Accept-Ranges, Location, ETag, WWW-Authenticate, Vary, Server, Retry-After.

Sanfoundry Global Education & Learning Series – HTML.

To practice all areas of HTML, here is complete set of 1000+ Multiple Choice Questions and Answers.

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.