HTML/CSS MCQ

HTML/CSS MCQs – Multiple Choice Questions and Answers – Part 1

Multiple choice questions and answers (MCQs) on HTML/CSS to prepare for exams, tests, and certifications. These questions are taken from a real written exam and some parts are taken from an interview. So you will find questions on basic techniques such as tags, web standards, CSS selector, objects, and more. This quiz will easily prepare anyone to pass their online test.
 

1. Which organization defines Web standards?

A Apple Inc.

B IBM Corporation

C World Wide Web Consortium

D Microsoft Corporation

C
The World Wide Web Consortium (W3C) is an international organization that defines standards and recommendations to ensure the harmonious development and interoperability of the Web. The W3C works on technologies such as HTML, CSS, XML, and many others, to ensure that the Web is accessible, scalable, secure, and functional for all users, regardless of their devices or browsers.

 

 

2. HTML is considered as ______ ?

A Programming language

B OOP language

C High level language

D Markup language

D
Markup languages are the languages of the Web. These markup languages include HTML, XML and XHTML.

 

 

3. HTML uses ______?

A User-defined tags

B Predefined tags

C Fixed tags defined by the language

D Tags for links only

C
HTML uses a set of standardized and fixed tags that cannot be modified. In HTML, tags are defined by the language. These are predefined elements used to structure and format content on a web page.

 

 

4. HTML was first proposed in ___.

A 1980

B 1990

C 1995

D 2000

B
HTML (HyperText Markup Language) was first proposed in 1990 by Tim Berners-Lee, the creator of the World Wide Web.

 

 

5. Which of the following is not a browser?

A Mozilla Firefox

B Netscape

C Microsoft Bing

D Opera

C
Bing is a web search engine owned and operated by Microsoft.

 

 

6. Who is the main author of the HTML?

A Brendan Eich

B Tim Berners-Lee

C Web developer

D Google Inc

B
The main author of HTML is Tim Berners-Lee, a British computer scientist. He is also the inventor of the World Wide Web (WWW).
 

7. What is the correct basic structure of an HTML document?

A

<!DOCTYPE html>
<html>
  <head>
    <title>Example Page</title>
  </head>
  <body>
    <h1>Hello World!</h1>
  </body>
</html>

B

<html>
  <head>
    <title>Example Page</title>
  </head>
  <body>
    <h1>Hello World!</h1>
  </body>
</html>

C

<!DOCTYPE html>
<html>  
  <header>    
    <title>Example Page</title>  
  </header>  
  <body>    
    <h1>Hello World!</h1>  
  </body>
</html>
A
Answer A is correct because it follows the basic structure of a valid HTML document.

  • <!DOCTYPE html>: Indicates that this is an HTML5 document.
  • <html>: Contains all the content of the page.
  • <head>: Contains metadata such as the page title.
  • <title>: Defines the page title that appears in the browser tab.
  • <body>: Contains the visible content of the page, like text and images.
 

8. If we want to set the style for just one element, which css selector will we use?

A id

B text

C class

D name

A
The id attribute can be applied to any HTML element. The value of this attribute is a unique identifier of the element. For example, <h1 id="title"> “title” is a unique identifier of h1.

 

 

9. The HTML tag that specifies a CSS style embedded in an element is called ____?

A Design

B Style

C Modify

D Define

B
The style attribute specifies an inline style for an element. Example:

<p style="color:green">This is a paragraph.</p>

 

 

10. The HTML standard which does not require double quotes around the values of an attribute is called ______?

A HTML 1

B HTML 3

C HTML 5

D HTML 7

C
In HTML5, it is possible to omit quotes around attribute values as long as the value does not contain spaces or special characters. However, it is recommended to use quotes for better compatibility. You can write in HTML5 without quotes:

<input type=text value=example>
 

11. A stricter type of HTML document is known as ______?

A DHTML

B XHTML

C XML

D HTML

B
XHTML (Extensible HyperText Markup Language) is a stricter version of HTML. Unlike HTML, XHTML follows XML rules, meaning the code must be well-formed, with properly closed tags, attributes in quotes, and tags in lowercase. In summary, XHTML enforces a more rigorous syntax than HTML.

 

mcqMCQPractice competitive and technical Multiple Choice Questions and Answers (MCQs) with simple and logical explanations to prepare for tests and interviews.Read More

One thought on “HTML/CSS MCQs – Multiple Choice Questions and Answers – Part 1

  • Paresh Kanti Paul

    Very useful for learning web design and web development

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *