🎓 हर हाथ कंप्यूटर, हर हाथ रोज़गार

    Study Material

    O Level M2-R5.1 MCQ Questions with Answers 2026 — 45 Web Designing Questions + Free Online Test

    45 important O Level M2-R5.1 (Web Designing and Publishing) MCQ questions with answers and explanations — HTML, CSS, W3.CSS, JavaScript, photo editor and web publishing — plus chapter tips, common traps, a 3-week plan and a free M2-R5 online test.

    ZK

    Zed-King Group of Institute

    Zed-King Group of Institute

    19 October 2026 19 min read 295 views
    O Level M2-R5.1 MCQ Questions with Answers 2026 — 45 Web Designing Questions + Free Online Test
    Free O Level Mock TestM1–M4 theory + practical papers, instant result. No fees.Start now

    Zed-King Study app · Free

    O Level students across India practise here, free

    Daily M1–M4 quizFull 100-question mocksAll-India rank
    Open the free app

    Google login · no Play Store needed

    🏆 Free All-India Sunday Mock · Sun, 6 Dec, 11 AM · CCC + O LevelRegister

    M2-R5.1 — Web Designing and Publishing is the most practical of the four O Level theory papers. Its questions are short, but they are exact: one wrong attribute name, one wrong CSS value order, or one W3.CSS class that sounds right but does not exist, and the mark is gone. Students who have actually built a web page find M2 easy; students who only read notes find the options confusing.

    This page gives you 45 important O Level M2 MCQ questions with answers — HTML, CSS, CSS framework, JavaScript, photo editor and web publishing — with a one-line explanation for every answer. The answer key of every question was checked by hand, and the JavaScript output questions were run in a real JavaScript engine before publishing. When you finish, take the free M2-R5 online test: 10 full sets of 50 questions in 45 minutes, graded on the NIELIT S–F scale. You can type any HTML or CSS from this page into our free online HTML, CSS and JavaScript editor and see the result yourself.

    Zed-King Group of Institute, Kaithal is a NIELIT Study Centre (ACCR-O3292) under the Ministry of Electronics & IT, Government of India, teaching O Level since 2006.

    📚 All modules in one place: O Level MCQ — chapter-wise questions with answers for M1, M2, M3 and M4.


    What This Page Covers

    Item

    Detail

    Module

    M2-R5.1 — Web Designing and Publishing

    Chapters

    8 — Introduction to Web Design, Editors, HTML Basics, CSS, CSS Framework, JavaScript, Photo Editor, Web Publishing and Browsing

    MCQs on this page

    45 from chapters 3–8, with answer and explanation (3 JavaScript output questions run before publishing)

    Practical paper for this module

    PR-2 (web pages with HTML, CSS and JavaScript on a computer)

    Passing marks

    50% in the module, separately from the practical

    Free online test

    10 sets × 50 questions, 45 minutes, instant result with explanations

    Chapters 1 (Introduction to Web Design) and 2 (Editors) are short theory — what a website is, static vs dynamic pages, and the editors used to write HTML. They are covered in our M2 chapter-wise notes; this page starts from HTML, where most of the marks are.


    Chapter-wise Weight in Our M2 Question Bank

    Our M2 question bank has 500 questions. HTML, CSS and JavaScript together hold 336 of them — about 67%. That is where your revision time should go first.

    Chapter

    Topic

    Questions in our bank

    What is asked most

    3

    HTML Basics

    137

    Tags and their attributes, lists, tables (colspan/rowspan), forms, links, HTML5 media tags

    4

    CSS

    113

    Selectors, box model, shorthand order, colours, text and background properties, ways to add CSS

    5

    CSS Framework

    57

    W3.CSS classes (container, panel, row/col, card, colours, sizes), Bootstrap basics

    6

    JavaScript

    86

    Variables, data types, operators, output questions, DOM (getElementById), events, AngularJS basics

    7

    Photo Editor

    49

    Image formats, raster vs vector, colour modes, selection and painting tools, layers

    8

    Web Publishing and Browsing

    58

    DNS, URL, HTTP/HTTPS, hosting and FTP, cookies, search engines, status codes


    How to Use These 45 Questions

    • Cover the answer and decide first. In M2 the wrong options are built to look correct — w3-xsmall, text-first-indent, target="_new". Saying your answer out loud before you look forces you to really know it.

    • Then try it. Type the tag or CSS rule into the HTML editor and look at the result. One minute of trying fixes a rule in memory far better than reading it again.

    • Read the explanation even when you were right — the exam asks the same idea with a different tag or value.

    • Finish with a timed test. 50 questions in 45 minutes is a different skill from 45 questions at your own pace.


    Chapter 3 — HTML Basics (9 MCQs)

    Q1. Which attribute of the <td> tag merges two cells horizontally?

    (A) Merge=row2
    (B) Colspan=2
    (C) Merge=colspan2
    (D) Rowspan=2

    ✅ Answer: (B) Colspan=2 — Colspan attribute merges specified number of table cells horizontally, so colspan=2 combines two adjacent cells into one.

    Q2. Which is the correct way to start a numbered (ordered) list from 4?

    (A) <ol type ="1" start="4">
    (B) <ol type ="1" begin = "4">
    (C) <ol type ="1"initial=""4">
    (D) <ol type = "1"num = "4">

    ✅ Answer: (A) <ol type ="1" start="4"> — The ordered list tag with type attribute set to numeric and start attribute set to 4 begins counting from four.

    Q3. Which tag shows an image from a folder named 'image' that is inside the parent folder of the current page?

    (A) <img src="../pic.img">
    (B) <img src="image/pic.img">
    (C) <img src=pic.img">
    (D) <img src="../image/pic.img">

    ✅ Answer: (D) <img src="../image/pic.img"> — Using two dots moves up one directory, then the image folder path correctly points to the picture file.

    Q4. Which target value opens a link in a new window or tab?

    (A) target="_new"
    (B) target="_self"
    (C) target="_blank"
    (D) target="_top"

    ✅ Answer: (C) target="_blank" — target="_blank" is the keyword that always opens the link in a new window or tab. _self opens it in the same tab.

    Q5. Which form method should be used when the form data contains sensitive information, such as a password?

    (A) Out
    (B) Put
    (C) Post
    (D) Get

    ✅ Answer: (C) Post — Using the POST method sends form data in the request body, preventing it from appearing in the URL.

    Q6. What is the default value of the type attribute of the <input> element?

    (A) password
    (B) numerals
    (C) date
    (D) text

    ✅ Answer: (D) text — When omitted, the input element defaults to type text, allowing plain textual data entry.

    Q7. Which element gives a visible heading to the <details> element?

    (A) main
    (B) summary
    (C) section
    (D) mark

    ✅ Answer: (B) summary — The summary element provides the visible heading that toggles the details content when clicked.

    Q8. Which element groups related options inside a drop-down list?

    (A) <option>
    (B) <output>
    (C) <optgroup>
    (D) <form>

    ✅ Answer: (C) <optgroup> — Optgroup groups related option elements within a select dropdown, allowing logical categorization.

    Q9. Which of the following is not a block element?

    (A) <a>
    (B) <ul>
    (C) <p>
    (D) <h1>

    ✅ Answer: (A) <a> — Anchor tag is an inline element, not a block-level element.

    💡 Chapter tip: Most HTML questions are about one attribute: colspan/rowspan for tables, start and type for ordered lists, target for links, method for forms, src and alt for images. Make a one-page table of tag → its important attributes and revise it daily. Also know which tags are empty (img, br, hr, input) and which are inline (a, span, img) vs block (p, div, h1–h6, ul).


    Chapter 4 — CSS (9 MCQs)

    Q10. An element needs margins of 20px top, 20px bottom, 30px right and 30px left. Which is the correct way to set them?

    (A) margin:20px 30px
    (B) margin:20px 20px 30px 30px
    (C) margin:30px 20px
    (D) margin:30px 30px 20px 20px

    ✅ Answer: (A) margin:20px 30px — Using two values sets vertical margins to 20px and horizontal margins to 30px.

    Q11. Which is the correct way to set border widths of top = 10px, bottom = 5px, left = 20px and right = 1px?

    (A) border-width:5px 20px 10px 1px;
    (B) border-width:10px 5px 20px 1px;
    (C) border-width:10px 1px 5px 20px;
    (D) border-width:10px 20px 5px 1px;

    ✅ Answer: (C) border-width:10px 1px 5px 20px; — Border-width:10px 1px 5px 20px; sets top, right, bottom and left widths in that order according to CSS shorthand syntax.

    Q12. A semicolon is missing in this CSS rule. Which property is applied?

    h1 {color:red text-decoration:underline; font-style:italic;}

    (A) Text-decoration:underline and font-style:italic works
    (B) Only font-style: italic works
    (C) Color:red,text-decoration:underline and font-style:italic all works
    (D) Color:red,text-decoration:underline works

    ✅ Answer: (B) Only font-style: italic works — Without a semicolon after red, the browser reads color: red text-decoration:underline as one invalid value and drops it. Only font-style: italic is applied.

    Q13. For a block element with a fixed width, what does margin: auto do?

    (A) Set the margin equally on top and bottom of the element
    (B) Set the margin equally on all side of the element.
    (C) It is uncertain what will happen
    (D) Set the margin equally on left and right of the element

    ✅ Answer: (D) Set the margin equally on left and right of the element — Setting margin auto centers the element by giving equal left and right margins.

    Q14. The transparent keyword is equal to which rgba() value?

    (A) rgba(255, 255, 255, 1)
    (B) rgba(0, 0, 0, 1)
    (C) rgba(0, 0, 0, 0)
    (D) rgba(255, 255, 255, 0.5)

    ✅ Answer: (C) rgba(0, 0, 0, 0) — Transparent corresponds to an RGBA color with zero red, zero green, zero blue and zero opacity.

    Q15. What does the CSS selector "p > a" select?

    (A) All adjacent anchor elements
    (B) All anchor elements directly inside a paragraph
    (C) All paragraph elements within an anchor
    (D) All anchor elements

    ✅ Answer: (B) All anchor elements directly inside a paragraph — P>a selector matches every anchor element that is an immediate child of a paragraph element.

    Q16. Which are valid ways to write white colour in CSS? (i) #FFFFFF (ii) rgb(255,255,255) (iii) rgb(FF,FF,FF)

    (A) Only I
    (B) Only III
    (C) Both I and III
    (D) Both I and II

    ✅ Answer: (D) Both I and II — Hexadecimal #FFFFFF and rgb with numeric values correctly represent white, while rgb with letters is invalid.

    Q17. Which CSS property decides whether table cells share one common border or have separate borders?

    (A) None
    (B) border-collapse
    (C) border-radius
    (D) border-spacing

    ✅ Answer: (B) border-collapse — Border-collapse determines whether table cells share a single border or have separate borders.

    Q18. Which property indents the first line of text in an element?

    (A) text-indent
    (B) text-first-indent
    (C) first-indent
    (D) text-first

    ✅ Answer: (A) text-indent — The text-indent property shifts the first line of a block of text inward by a specified length.

    💡 Chapter tip: Learn the shorthand order once and you win several questions: four values go top → right → bottom → left (clockwise), two values mean top/bottom then left/right. Know the box model (content → padding → border → margin), selector types (div p, p>a, .class, #id, :first-child), and the three ways to add CSS — inline, internal (embedded) and external.


    Chapter 5 — CSS Framework (W3.CSS and Bootstrap) (6 MCQs)

    Q19. Bootstrap's layout uses which grid system?

    (A) 16-column
    (B) 6-column
    (C) 12-column
    (D) 8-column

    ✅ Answer: (C) 12-column — Bootstrap’s layout system is based on a twelve‑column responsive grid.

    Q20. Which of these is NOT a CSS framework?

    (A) Bootstrap
    (B) W3.CSS
    (C) Foundation
    (D) jQuery

    ✅ Answer: (D) jQuery — Bootstrap, W3.CSS and Foundation are CSS frameworks. jQuery is a JavaScript library.

    Q21. Which W3.CSS class right-aligns the text inside an element?

    (A) w3-align-right
    (B) w3-text-right
    (C) w3-right-align
    (D) w3-right

    ✅ Answer: (C) w3-right-align — w3-right-align sets text-align: right. w3-right is different — it floats the whole element to the right.

    Q22. Which W3.CSS class adds a 16px top and bottom margin and a 16px left and right padding to an element?

    (A) w3-panel
    (B) panel-w3
    (C) Both of the above
    (D) None

    ✅ Answer: (A) w3-panel — w3-panel adds 16px margin above and below and 16px padding on the left and right — handy for notes and alerts.

    Q23. In W3.CSS, which class is the container for a responsive grid of columns?

    (A) w3-res
    (B) w3-row
    (C) w3-rwd
    (D) w3-block

    ✅ Answer: (B) w3-row — Columns (w3-col, w3-half, w3-third…) are placed inside a w3-row, which makes them stack on small screens.

    Q24. Which of these is NOT a W3.CSS size class that can be used on a list?

    (A) w3-large
    (B) w3-small
    (C) w3-xlarge
    (D) w3-xsmall

    ✅ Answer: (D) w3-xsmall — W3.CSS sizes are w3-tiny, w3-small, w3-medium, w3-large, w3-xlarge, w3-xxlarge, w3-xxxlarge and w3-jumbo. There is no w3-xsmall.

    💡 Chapter tip: The NIELIT syllabus teaches W3.CSS, so most questions are its class names: w3-container (16px left/right padding), w3-panel (16px margin top/bottom + 16px padding left/right), w3-row and w3-col for the 12-column grid, w3-half / w3-third / w3-quarter, w3-card, w3-round, w3-center. Watch the look-alikes: w3-right floats the element, w3-right-align aligns its text.


    Chapter 6 — JavaScript (9 MCQs)

    Q25. What is the correct difference between var and let in JavaScript?

    (A) The values of a variable declared with var can be changed while the value of a variable declared with let cannot changed.
    (B) There is no such major difference between them.
    (C) Var defines a variable while let defines a constant.
    (D) Var defined function scoped variable while let define block scoped variables.

    ✅ Answer: (D) Var defined function scoped variable while let define block scoped variables. — Var creates a function scoped variable whereas let creates a block scoped variable.

    Q26. What is shown in the paragraph by this code?

    var a;
    document.getElementById("demo").innerHTML = a + 1;

    (A) NaN
    (B) 1
    (C) Undefined
    (D) 0

    ✅ Answer: (A) NaN — Variable a is undefined, adding 1 results in Not a Number which displays as NaN.

    Q27. What is shown in the paragraph by this code?

    var js = 10;
    js *= 5;
    document.getElementById("demo").innerHTML = js;

    (A) 50
    (B) 10
    (C) 5
    (D) 15

    ✅ Answer: (A) 50 — Multiplying the initial value 10 by 5 stores 50 in js, which is then written to the paragraph.

    Q28. What type of value do you get from a + b here?

    var a = "10";
    var b = 50;
    a + b

    (A) Long
    (B) Number
    (C) Integer
    (D) Text

    ✅ Answer: (D) Text — Adding a string and a number coerces the number to a string, resulting in concatenated text.

    Q29. Which attribute makes an external script run only after the page has finished parsing?

    (A) Parse
    (B) Defer
    (C) Type
    (D) Async

    ✅ Answer: (B) Defer — Defer attribute tells the browser to execute the external script after the document has been parsed, without blocking rendering.

    Q30. Which AngularJS directive gives two-way data binding?

    (A) ng-bind
    (B) ng-join
    (C) ng-model
    (D) ng-connect

    ✅ Answer: (C) ng-model — Ng-model creates two-way data binding between form inputs and the Angular model, synchronizing changes both ways.

    Q31. Which of these is NOT a JavaScript data type?

    (A) String
    (B) Boolean
    (C) Undefined
    (D) Integer

    ✅ Answer: (D) Integer — JavaScript does not have a distinct integer data type, only a generic number type.

    Q32. Which statement changes the text of <p id="OLEVEL">This is OLEVEL</p> to "A LEVEL"?

    (A) document.getElement("OLEVEL").innerHTML = "A LEVEL";
    (B) document.getElementById("OLEVEL").innerHTML = A LEVEL;
    (C) document.getElementById("OLEVEL").innerHTML = "A LEVEL";
    (D) document.getId("OLEVEL") = "A LEVEL";

    ✅ Answer: (C) document.getElementById("OLEVEL").innerHTML = "A LEVEL"; — GetElementById accesses element with id OLEVEL and innerHTML replaces its content as required.

    Q33. Which of the following statements is FALSE?

    (A) Deferred scripts run before the DOMContentLoaded event
    (B) All older browsers support the async attribute
    (C) Deferred scripts run in the order they appear in the page
    (D) An async script runs as soon as it has downloaded

    ✅ Answer: (B) All older browsers support the async attribute — async is a newer attribute — older browsers (for example Internet Explorer 9 and earlier) do not support it. The other three statements are true.

    💡 Chapter tip: Expect a few output questions — trace them on paper, then run them in a browser console or our editor. Remember that undefined + 1 is NaN, a string + a number joins them as text, and *= / += change the variable itself. Learn var (function scope) vs let (block scope), defer vs async on the script tag, and document.getElementById(...).innerHTML.


    Chapter 7 — Photo Editor (6 MCQs)

    Q34. Which of these image formats supports transparency?

    (A) Jpg
    (B) bmp
    (C) png
    (D) jpeg

    ✅ Answer: (C) png — PNG format includes an alpha channel, allowing parts of the image to be fully or partially transparent.

    Q35. A raster image is also known as a ______.

    (A) Graphic image
    (B) Color image
    (C) Curve image
    (D) Bitmap image

    ✅ Answer: (D) Bitmap image — A raster image is also called a bitmap image because it stores pixel data.

    Q36. Which colour mode is used for printing?

    (A) Grayscale
    (B) RGB
    (C) CMYK
    (D) None of these

    ✅ Answer: (C) CMYK — Printing requires CMYK color mode because it uses cyan magenta yellow and key black inks.

    Q37. Which image format is commonly used for simple animations on web pages?

    (A) .BMP
    (B) .GIF
    (C) .JPEG
    (D) .TIFF

    ✅ Answer: (B) .GIF — A GIF can hold several frames that play one after another, so it is widely used for small web animations. BMP, JPEG and TIFF are still images.

    Q38. The range of colours that a colour system can display or print is called its ______.

    (A) The Gamut
    (B) Dithering
    (C) Colour Model
    (D) None of the above

    ✅ Answer: (A) The Gamut — A colour system's gamut refers to the complete range of colours it can reproduce.

    Q39. Which blur filter is used to create the effect of rain or snow?

    (A) Radial
    (B) Motion
    (C) Lens
    (D) Gaussian

    ✅ Answer: (B) Motion — Motion blur simulates the streaking effect of falling rain or snow particles.

    💡 Chapter tip: Know the formats: JPEG for photographs, PNG for transparency, GIF for simple animation, EPS/SVG for vector images, PSD for Photoshop files. Raster = bitmap (made of pixels). RGB is for screens, CMYK for printing. Then the tools: lasso (freehand selection), clone stamp (copy pixels), paint bucket (fill), crop, and the layers panel.


    Chapter 8 — Web Publishing and Browsing (6 MCQs)

    Q40. Which of these HTTP status codes is written INCORRECTLY?

    (A) 200 OK
    (B) 400 Bad request
    (C) 301 Moved permanently
    (D) 304 Not found

    ✅ Answer: (D) 304 Not found — Status code 304 indicates not modified, not not found, which is 404.

    Q41. Which system translates an IP address into an easier-to-remember name?

    (A) Packet Switching
    (B) DNS
    (C) None
    (D) Domain Numbering System

    ✅ Answer: (B) DNS — DNS translates numeric IP addresses into human‑readable domain names, allowing users to access resources by memorable names.

    Q42. What is the size of an IPv6 address?

    (A) 128 bits
    (B) 64 bits
    (C) 256 bit
    (D) 32 bits

    ✅ Answer: (A) 128 bits — An IPv6 address consists of one hundred twenty‑eight bits, allowing a vastly larger address space than IPv4.

    Q43. Which of these is a tool used to publish (upload) website files to a web server?

    (A) Winamp
    (B) Notepad
    (C) FileZilla
    (D) VLC

    ✅ Answer: (C) FileZilla — FileZilla is a popular FTP client used to upload website files to a server.

    Q44. What is a cookie?

    (A) Computer code that automatically records all purchases and payments you make from your computer
    (B) Computer code used to show animation and play sound
    (C) An advertisement that will at some time be displayed on your screen
    (D) Information sent to the computer that is used later to give information back to a visited website

    ✅ Answer: (D) Information sent to the computer that is used later to give information back to a visited website — A cookie is data stored on the client that the server can read on subsequent visits.

    Q45. What is a web crawler?

    (A) A hacker community who acts website
    (B) a computer virus
    (C) A program that indexes website
    (D) A browser

    ✅ Answer: (C) A program that indexes website — A web crawler automatically visits web pages and records their content for indexing in search engines.

    💡 Chapter tip: This chapter is short and scoring: DNS (domain name ↔ IP address), URL, HTTP vs HTTPS (the lock icon), web hosting and FTP upload (FileZilla), cookies, cache, search engines and crawlers (spiders). Learn the common HTTP status codes — 200 OK, 301 Moved Permanently, 304 Not Modified, 404 Not Found — and that an IPv4 address is 32 bits, IPv6 128 bits.


    6 M2 Traps That Cost Marks

    • CSS four-value shorthand is clockwise — top, right, bottom, left. margin: 10px 1px 5px 20px means top 10, right 1, bottom 5, left 20.

    • A missing semicolon kills the next property too — the browser reads both as one invalid value and drops it (Q12).

    • target="_blank", not _new — _blank is the keyword that opens a new tab or window.

    • Look-alike W3.CSS classes — w3-right floats the element, w3-right-align aligns its text. There is no w3-xsmall; the smallest size class is w3-tiny.

    • JavaScript + joins text — "10" + 50 is the string "1050", not 60.

    • 304 is Not Modified — Not Found is 404. Status-code questions swap these two.


    Practise Free — Test, Editor and Examples

    Everything below is free — no login, no fee, no registration:

    Start the Free M2-R5 Online Test


    A 3-Week Plan for M2

    • Week 1: Chapters 1–3. Build one small web page every day — headings, lists, a table with colspan, a form with every input type. Do the HTML questions above with the editor open.

    • Week 2: Chapters 4 and 5. Style the same pages with CSS: selectors, box model, shorthand. Then rebuild one page with W3.CSS classes and learn the class names from it.

    • Week 3, days 1–3: Chapters 6–8 — JavaScript basics and output questions, photo-editor tools and formats, and web publishing terms.

    • Week 3, days 4–7: one full M2 online test every day. After each test, try every wrong answer in the editor until you can see why it was wrong.

    A score of 85% or more gives an S grade. In M2 that is very reachable — the paper rewards exactness, and exactness comes from having typed the code yourself.


    Learn O Level at Zed-King Institute, Kaithal

    Zed-King Group of Institute is a NIELIT Study Centre — ACCR-O3292 — Ministry of Electronics & IT, Government of India, running in Kaithal since 2006. Our O Level students build web pages in the lab from the first week, take weekly timed M2 tests and prepare the PR-2 practical with a teacher beside them.

    Course

    Fee

    Duration

    NIELIT O Level (M1–M4 with all practicals)

    ₹20,000

    1 Year

    Want web design on its own, without the full O Level? See our Web Designing & Multimedia course.

    Visit us at: Kaithal - Pundri - Karnal Rd, near New Bus Stand, opp. Hanuman Vatika, Friends Colony, Kaithal, Haryana 136027. Call +91-9416111612.

    Join O Level Course — NIELIT Study Centre, Kaithal


    Related Reading

    Tags

    #o level m2 mcq#m2-r5.1 mcq questions#m2 r5 online test#web designing mcq questions with answers#html css mcq#o level m2 important questions#w3.css mcq#o level mock test#nielit o level kaithal#o level online test

    Free for every student

    Practise before the real exam — 100% free

    O Level mock tests (M1–M4 theory and PR-1–PR-4 practical) with instant grading, plus free notes, PDFs and video classes for CCC, O Level and ECC. No fees, no registration.

    FAQ

    Frequently Asked Questions

    6 Questions

    Share this Article

    Follow ZedKing

    Stay updated on all channels

    ZedKing Courses

    Is topic ko depth mein seekhna hai?

    NIELIT & Indian Govt. certified programmes, expert faculty, aur guaranteed career support.

    Ready to Begin Your Career in Technology?

    Join Zed-King Group of Institute — Kaithal's premier Indian Govt. Authorized computer education centre. NIELIT certified since 2006.

    📍 Zed-King Group of Institute, Kaithal, Haryana — 136027

    Drag me!