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
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
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
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.
4. Which of the following are not the valid character set in HTTP?
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)
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.
6. Which header field defines meta information?
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?
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.
8. Which symbol is used when HTTP request does not apply to the particular source?
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?
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.
10. What does ‘3xx’ code denote?
b) Server Error
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?
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.