How an HTML lab viva actually goes
In most universities the web technology or internet programming lab exam has three parts: you write and execute one program from the list, the examiner checks the output on your screen, and then the viva starts. The internal examiner knows your batch; the external examiner, appointed by the university for the end-semester practical, does not, and reads your record while asking. Viva marks are a component of the practical marks under your university's scheme and usually decide who gets full marks, so a correct program with a blank viva is a half score.
The questions follow a pattern. First, something from the program you just ran ('why did you use the method post here?'). Second, a definition-level basic ('what is the difference between id and class?'). Third, a what-if ('if I remove the doctype line, what changes?'). Fourth, if you are doing well, one deeper question on HTML5 or CSS layout. Answer each in two to four spoken sentences: name the concept, say what it does, give one example, stop.
Before you read the questions
Open your own lab record next to this page. For every question below, find the line in your own program where the concept appears. Examiners ask from your record, not from a question bank, and 'I used it in experiment four for the login form' is the answer that scores.
HTML basics: the first ten minutes of every viva
What is HTML?
HTML is HyperText Markup Language, the standard language for structuring content on a web page. It is a markup language, not a programming language: it describes headings, paragraphs, links and images with elements, and the browser renders them. The current version is HTML5.
Examiners listen for 'markup, not programming'. Call it a programming language and the next question is 'then write a loop in it'.
What is the difference between a tag, an element and an attribute?
A tag is the marker in angle brackets, like the opening and closing p tags. An element is the whole thing: opening tag, content and closing tag. An attribute is extra information inside the opening tag, like href on an anchor, written as name equals value.
What is the basic structure of an HTML document?
The doctype declaration, then the html element with two children: head and body. The head holds metadata such as the title, character set and stylesheet links; the body holds everything the user sees. In my programs I wrote the title and meta charset before any content.
What does the DOCTYPE declaration do?
It tells the browser which version of HTML the page uses so it renders in standards mode. In HTML5 it is just doctype html, with no DTD URL as in HTML4. Without it the browser falls into quirks mode, where box sizes and some CSS behave in old, inconsistent ways.
What is the difference between the head and body sections?
The head contains information about the page that is not displayed as content: the title on the browser tab, meta tags, CSS links and scripts. The body contains the visible content: text, images, forms and tables. The title is the one head element the user actually sees.
What are block-level and inline elements? Give examples.
A block-level element starts on a new line and takes the full available width, like div, p, h1 and ul. An inline element sits within a line and takes only its content's width, like span, a, strong and img. The CSS display property changes this, for example inline list items for a horizontal menu.
What are empty or void elements?
Elements that have no content and no closing tag: br for a line break, hr for a rule, img, input, meta and link. In HTML5 the trailing slash is optional. The browser ignores anything you try to put inside them.
How do you create a hyperlink, and what does target blank do?
With the anchor element: the a tag with an href attribute holding the URL, and the clickable text between the tags. Target equals underscore blank opens the link in a new tab. For external links I add rel noopener so the new page cannot access the window that opened it.
What is the difference between an absolute and a relative URL?
An absolute URL has the full address with protocol and domain. A relative URL is given relative to the current page, like images slash logo dot png. In the lab I used relative paths so the project still works when the folder is copied to another machine.
How do you insert an image, and why is the alt attribute important?
With the img element: src gives the file path and alt gives a text description. Alt text is shown if the image fails to load and is read out by screen readers, so it matters for accessibility. Width and height are better set in CSS than as attributes.
What are the three kinds of lists in HTML?
Unordered lists with ul and li, which show bullets; ordered lists with ol and li, which show numbers controlled by the type and start attributes; and description lists with dl, dt for the term and dd for the description. I used an unordered list for the navigation menu in my college home page.
What is the difference between id and class?
An id is unique: only one element on the page should have it, and I can jump to it with a hash link or select it with getElementById. A class can be shared by many elements and one element can have several classes, so classes are for styling groups. An id selector also beats a class in CSS specificity.
What are HTML entities?
Codes starting with an ampersand and ending with a semicolon that show characters with special meaning in HTML or not on the keyboard. For example ampersand l t semicolon shows a less-than sign, ampersand n b s p semicolon is a non-breaking space, and ampersand copy semicolon is the copyright symbol.
Forms and tables: the questions from your registration-form program
How do you create a table in HTML?
With the table element containing rows, tr, and inside each row header cells, th, or data cells, td. I group the header row in thead and data rows in tbody, and add a caption for the title. Borders and spacing come from CSS, not the old border attribute.
What do rowspan and colspan do?
Colspan stretches one cell across more than one column; rowspan stretches it down across more than one row. In my timetable program I used colspan equals two on the lunch-break cell so it covered two periods, and rowspan on the day name to run down the whole row group.
What is the difference between th and td?
Th is a header cell: bold and centred by default, and screen readers use it to announce the column or row heading for each data cell. Td is an ordinary data cell. Using th properly is a semantic choice, not just a styling one.
What is a form, and what do the action and method attributes do?
A form collects user input and sends it to a server. Action is the URL that receives the data; method is how it is sent, get in the URL or post in the request body. In the lab my action pointed to a PHP file that read the submitted values.
What is the difference between GET and POST?
Get puts the form data in the URL as a query string, so it is visible, bookmarkable and limited in length; it suits searches. Post sends the data in the request body, hidden from the URL and able to carry larger data and files; it suits logins, registrations and anything that changes data on the server.
Name some input types that HTML5 added.
Email, url, number, range, date, time, color, search and tel. They give the right keyboard on mobile and built-in validation: an email field will not submit without an at sign, and a number field with min and max rejects values outside the range.
What is the difference between a radio button and a checkbox?
Radio buttons sharing the same name attribute form a group where only one can be selected, like a payment mode. Checkboxes are independent, so the user can tick several, like hobbies. Both send their value attribute to the server when checked.
What is the label element, and how do you connect it to an input?
A label is the visible text for a form control. I give the input an id and set the label's for attribute to the same id, or wrap the input inside the label. Then clicking the text focuses the control, and screen readers read the label with the field.
What do the required and value attributes do?
Required stops the form submitting until the field is filled, which is client-side validation without any JavaScript. Value is the initial content of the field and is what gets submitted if the user changes nothing. On a checkbox or radio, value is what the server receives when it is ticked.
When do you use textarea, select and option?
Textarea is a multi-line text box for an address or feedback, sized with rows and cols. Select creates a dropdown and each option inside is one choice; the selected attribute pre-picks one. For a long list such as the states of India a select is better than thirty radio buttons.
HTML practical questions with solutions: the tasks examiners set
In the practical exam you are usually given one of these tasks, then asked to explain it. The solutions below are written the way you would say them in the viva: the elements you used, in order, with the key attributes. Code is shown in plain text, with tag names written without angle brackets; type them with brackets in your editor.
How to read the code on this page
When you see: input type="email" name="email" required, it means an input tag with those three attributes. When you see: p ... /p, it means an opening and a closing p tag around the content.
Write a student registration form with name, email, gender, course and a submit button.
I start with: form action="register.php" method="post". Inside, a label for="name" with input type="text" id="name" name="name" required. Then input type="email" for email, two input type="radio" name="gender" with values male and female so only one can be chosen, a select name="course" with option elements for BCA, B.Sc and B.Tech, and finally input type="submit" value="Register".
Expect the follow-up: why do both radio buttons share the same name?
Make a class timetable using a table, where lunch spans all days.
I use table border="1", a first tr with th cells for Day and the periods, then one tr per day. The lunch column is a single td with rowspan="6" in the Monday row, so it covers Monday to Saturday, and I simply leave out that cell in the other five rows. A caption element above gives the table a title, like Class Timetable, Semester 3.
Count the cells in each row after a rowspan; a wrong count is the most common mistake examiners point at.
Create a nested list: courses as an ordered list, subjects inside each as an unordered list.
The outer list is ol with an li for each course. Inside the B.Tech li, after the text, I open a ul with li items for Data Structures, DBMS and Web Technology, then close the ul before closing that outer li. Nesting the ul inside the li, not between two li elements, is what makes it valid.
Indent your nested lists in the record so the examiner can see the structure at a glance.
Link from the top of a long page to a section further down, and back.
Give the target an id, for example h2 id="contact". The link is an anchor whose href is the hash sign followed by contact. For back to top, I put an id on the page heading and link to it the same way. No JavaScript is needed; the browser scrolls to the element with that id.
Embed a YouTube video and a local video file on the same page.
For the local file I use video controls width="480" with a source src="lab-demo.mp4" type="video/mp4" inside, and a line of fallback text. For YouTube I use an iframe with the embed URL from the Share then Embed option, width and height set, and allowfullscreen. The video element plays files I host; the iframe shows another site inside mine.
Build a horizontal navigation bar with HTML and CSS.
In HTML: nav, then ul with li items, each containing an anchor. In CSS: nav ul { list-style: none; display: flex; gap: 20px; } removes bullets and puts items in a row, and nav a { text-decoration: none; padding: 8px 12px; } makes them look like buttons. A hover rule changes the background colour.
If asked for an older method, mention display: inline-block on the li elements, or float: left.
Validate a 10-digit mobile number in a form without JavaScript.
I use input type="tel" name="mobile" pattern="[0-9]{10}" required, plus a title attribute such as Enter a 10-digit mobile number, which the browser shows when the pattern fails. The required attribute blocks an empty submit. This is client-side only; the server must check again because HTML validation can be bypassed.
Saying server-side validation is still needed earns marks every time.
Make a two-column page layout: a sidebar and main content.
In HTML I use aside for the sidebar and main for the content, inside a div class="container". In CSS: .container { display: flex; } then aside { width: 25%; } and main { flex: 1; }. For mobile, a media query switches the container to flex-direction: column so the sidebar moves above the content.
Show an image that opens a larger version when clicked.
I wrap the small image inside an anchor: a href="photo-large.jpg" target="_blank", and inside it img src="photo-small.jpg" alt="College main building" width="200". Clicking the thumbnail opens the large file in a new tab. The alt text describes the image for screen readers and shows if the file fails to load.
Create a simple feedback form using textarea, a dropdown and a checkbox.
Inside the form: textarea name="comments" rows="5" cols="40" for the message, select name="rating" with options Excellent, Good and Poor, and input type="checkbox" name="subscribe" value="yes" with a label Email me updates. A reset button, input type="reset", clears all fields, and submit sends them.
Semantic HTML5: the questions that separate a 7 from a 10
What is semantic HTML and why does it matter?
Semantic HTML uses elements whose names describe their meaning, like nav, article and footer, instead of divs everywhere. It matters because search engines, screen readers and other developers can understand the page structure without reading the CSS.
Name the main semantic elements introduced in HTML5.
Header, nav, main, section, article, aside, footer, figure and figcaption, plus time and mark for inline meaning. In my college website program I used header for the banner, nav for the menu, section for departments and footer for contact details.
What is the difference between section, article and div?
An article is self-contained content that makes sense on its own, like a news post or a product card. A section is a thematic grouping inside a page, usually with its own heading. A div has no meaning; it is only a container for styling when no semantic element fits.
What are the main differences between HTML4 and HTML5?
HTML5 added semantic elements, native audio and video, canvas and inline SVG, new form input types with validation, local and session storage, and APIs like geolocation. It simplified the doctype and dropped presentational tags like font and center in favour of CSS.
How do you embed audio or video in HTML5?
With the audio or video element and a src attribute, or source elements inside it for multiple formats like MP4 and WebM so every browser can play one. The controls attribute shows the play bar; autoplay, loop and muted are also available. Before HTML5 this needed a plugin.
What is the difference between canvas and SVG?
Canvas is a bitmap surface drawn by JavaScript: once drawn, shapes are just pixels, not objects. SVG is vector graphics in XML, so every shape is a DOM element that can be styled, scaled without blurring and given a click event. Charts and games use canvas; icons and logos use SVG.
What is the meta viewport tag and why do mobile pages need it?
A meta tag in the head with name viewport and content width equals device-width, initial-scale equals one. Without it a phone renders the page at desktop width and shrinks it, so the text is tiny. With it the page uses the real screen width and my media queries work.
What is an iframe, and what is the risk of using one?
An iframe embeds another HTML page inside the current page, such as a Google Map or a YouTube video. The embedded page is a separate document, often from another site, so it can be misused for clickjacking; the sandbox attribute and the server's frame headers limit this.
What is the difference between localStorage, sessionStorage and cookies?
All three store data in the browser. LocalStorage keeps key-value pairs with no expiry; sessionStorage keeps them only until the tab closes. Cookies are small, have an expiry and are sent to the server with every request, which is why logins use cookies and a theme preference uses localStorage.
Head tags, accessibility and HTML5 APIs
What does meta charset="UTF-8" do?
It tells the browser the character encoding of the page. UTF-8 covers almost every script, so Hindi, Tamil or the rupee symbol display correctly instead of as garbled characters. It should be the first thing inside head, before the title.
What is the role of the title tag?
The title appears on the browser tab, in bookmarks and as the clickable headline in search results. Every page should have one unique, descriptive title. It is not the same as an h1, which is the visible heading on the page itself.
What is the difference between strong and b, and between em and i?
Strong and em carry meaning: strong is important text, em is stressed emphasis, and screen readers can convey that. B and i are only visual, bold and italic. For meaning I use strong and em; for styling alone, CSS is better.
What are data attributes?
Custom attributes that start with data-, for example div data-roll="21". They store extra information on an element without affecting display, and JavaScript reads them through the dataset property. They are useful for small details a script needs, like an ID.
What is web accessibility, and name three things you do for it.
Making a page usable by everyone, including people using screen readers or only a keyboard. I give every image meaningful alt text, connect every input to a label, and use proper headings in order. Good colour contrast and semantic elements like nav and button also help.
What are details and summary used for?
They make a collapsible section without JavaScript. Summary is the visible clickable line, and the rest of the content inside details stays hidden until clicked. I used it for an FAQ section in my lab program.
What do progress and meter show?
Progress shows how far a task has gone, like a file upload, with value and max attributes. Meter shows a measurement within a known range, like disk usage or a test score. Progress is for something that is moving; meter is a static reading.
What is the Geolocation API?
An HTML5 browser API that gives the user's location through navigator.geolocation.getCurrentPosition, after the user grants permission. It returns latitude and longitude. It works only on secure https pages, and the user can always deny it.
CSS basics: asked in every HTML and CSS viva
What is CSS, and what are the three ways to apply it?
CSS is Cascading Style Sheets, the language that controls how HTML looks: colours, fonts, spacing and layout. It can be applied inline with the style attribute, internally in a style element in the head, or externally in a dot css file linked with the link tag. External is preferred because one file styles the whole site.
If inline, internal and external styles conflict, which one wins?
Inline wins, because it has the highest specificity. Between internal and external, whichever is declared later wins if the selectors are equal. Inside a stylesheet, an id beats a class, a class beats an element, and the important declaration overrides everything, which is why I avoid it.
Explain the CSS box model.
Every element is a box with four layers: content, then padding, then border, then margin. By default width applies only to the content, so padding and border add to the total size; setting box-sizing to border-box makes width include them, which I set globally in my stylesheets.
What is the difference between margin and padding?
Padding is the space between the content and the border, inside the element, and it takes the background colour. Margin is the space outside the border between this element and its neighbours, and it is transparent. Vertical margins between blocks can collapse into one; padding never collapses.
What are CSS selectors? Name a few types.
A selector picks which elements a rule applies to: element selectors like p, class selectors with a dot, id selectors with a hash, descendant selectors like nav a, attribute selectors, and pseudo-classes like hover and first-child. A comma groups several selectors under one rule.
What is the difference between display none and visibility hidden?
Display none removes the element from the layout, so it takes no space and other elements move up. Visibility hidden makes it invisible but keeps its space, leaving a gap. For a dropdown menu I toggle display; for a slot that must keep its size I use visibility.
Explain the values of the position property.
Static is normal flow. Relative shifts the element from its normal spot with top or left while keeping its space. Absolute removes it from flow and positions it against the nearest positioned ancestor. Fixed positions it against the viewport so it stays on scroll. Sticky acts as relative until a scroll threshold, then as fixed.
What is flexbox, and when would you use grid instead?
Flexbox is one-dimensional: a container with display flex lays its children in a row or column, and justify-content and align-items control spacing and alignment. Grid is two-dimensional, rows and columns at once. I used flex for the navigation bar and grid for the three-column course cards.
What is a media query?
A media query applies CSS rules only when a condition is true, usually screen width, for example at media max-width 600 pixels. It is the basis of responsive design: the same HTML gets one column on a phone and three on a desktop. It needs the viewport meta tag to work on mobile.
What is the difference between px, em, rem and percent?
Px is a fixed pixel size. Em is relative to the parent's font size, so it compounds in nested elements. Rem is relative to the root html font size, which makes it predictable for spacing and type. Percent is relative to the parent's size and is used for widths in fluid layouts.
What is Bootstrap, and how is it different from writing CSS yourself?
Bootstrap is a CSS and JavaScript framework with ready-made classes for the grid, buttons, forms and navigation, so a responsive page is built by adding class names. The trade-off is a larger download and pages that look alike. In the lab I used its grid and wrote custom CSS for colours.
CSS viva questions: one level deeper
What is CSS specificity?
The rule the browser uses when two selectors target the same element. Inline styles beat id selectors, ids beat classes, attributes and pseudo-classes, and those beat element selectors. If specificity is equal, the rule written later wins. Adding the important flag overrides all of these, so I use it rarely.
What is the difference between a pseudo-class and a pseudo-element?
A pseudo-class selects an element in a state, like a:hover or li:first-child, written with one colon. A pseudo-element styles a part of an element, like p::first-line or a::before, written with two colons. One is about state, the other about a part.
How do you centre a div horizontally and vertically?
With flexbox on the parent: display: flex; justify-content: center; align-items: center; and give the parent a height. With grid it is display: grid; place-items: center;. For horizontal centring only, margin: 0 auto on a block with a fixed width also works.
What does box-sizing: border-box do?
It makes width and height include padding and border. Without it, a 200px box with 20px padding becomes 240px wide. With border-box it stays 200px and the content shrinks. Most stylesheets set it on every element to keep layouts predictable.
What is z-index?
It controls which positioned element sits on top when elements overlap. A higher value comes in front. It only works on elements with a position other than static, which is why a z-index sometimes seems to do nothing.
What is the difference between a transition and an animation in CSS?
A transition animates a change between two states, for example a button colour changing on hover over 0.3 seconds. An animation uses keyframes to run a sequence on its own, can loop, and does not need a trigger. Transitions are for simple effects; animations for multi-step ones.
What are CSS variables?
Custom properties declared like --main-colour: navy; usually on the root selector, and used with var(--main-colour). Change the value once and every rule using it updates. They are handy for a theme colour across a whole lab website.
What is responsive web design?
Designing one page that adapts to every screen size. The three tools are the meta viewport tag, flexible layouts with percentages, flexbox or grid, and media queries such as @media (max-width: 600px) that change styles on small screens. Images get max-width: 100% so they never overflow.
The follow-ups an external examiner asks after your first answer
Once you answer a basic correctly, a good examiner pushes one level deeper on the same point to see whether you understand it or memorised it. These are the pushes that appear in almost every web technology viva, with the answers that end the line of questioning.
If I delete the doctype line from your program, what will change?
The page still displays, but the browser switches to quirks mode. The visible effects are in CSS: widths include padding differently, table font sizes are not inherited, and layouts shift by a few pixels. Nothing breaks dramatically, but the page is no longer rendered to the standard.
Your image shows a broken icon. What will you check first?
The src path first: whether the file is in the folder I referenced and whether the case of the file name matches, because Linux servers are case sensitive. Then the extension, jpg versus jpeg. The alt text appearing tells me the path, not the img tag, is wrong.
Your stylesheet is linked but the styles are not applying. Why?
I would check four things in order: the href path in the link tag, whether rel equals stylesheet is present, whether the browser cache is serving the old file, and whether a more specific selector or an inline style is overriding my rule. The developer tools show which rule won.
How is HTML different from XML and XHTML?
XML is a general markup language for data with strict rules: every tag closed, case-sensitive, and you define your own tags. XHTML is HTML rewritten under XML rules, so a missing closing tag is an error. HTML5 is forgiving: browsers correct unclosed tags and ignore case.
Where should JavaScript go in the page, and why at the end of the body?
A script tag can go in the head or the body. Placing it just before the closing body tag means the HTML above is already parsed, so the elements the script refers to exist and the page is not blank while the script downloads. The modern alternative is the defer attribute on a script in the head.
What is the DOM?
The Document Object Model is the tree of objects the browser builds from the HTML, with the document at the root and every element, attribute and text as nodes. JavaScript changes the page by changing this tree, for example getElementById and then setting innerText. CSS is applied to the same tree.
JavaScript with HTML: the questions that come at the end
How do you select an element in JavaScript?
document.getElementById("name") returns the element with that id. document.querySelector takes any CSS selector and returns the first match, and querySelectorAll returns all matches. In my form program I used getElementById to read the value of the email field.
What is the difference between innerHTML and textContent?
innerHTML reads or sets the content including any tags, so the browser parses it as HTML. textContent treats everything as plain text. For putting user input on a page, textContent is safer because it cannot inject markup or scripts.
How do you handle a button click?
Either an onclick attribute on the button calling a function, or in a script: button.addEventListener("click", showMessage). addEventListener is preferred because it keeps HTML and JavaScript separate and allows more than one handler on the same element.
How do you validate a form with JavaScript before it submits?
I attach a function to the form's submit event. Inside, I check each field, for example that the password is at least 8 characters, and if a check fails I show a message and call event.preventDefault() so the form does not submit. It adds checks HTML attributes cannot do, like matching two password fields.
What is the difference between alert, confirm and prompt?
All three are browser dialogs. Alert shows a message with OK. Confirm asks a yes or no question and returns true or false. Prompt asks for text input and returns what the user typed, or null if cancelled. They block the page, so real sites use custom dialogs instead.
What do async and defer do on a script tag?
Both load the script without blocking the HTML parser. Async runs the script as soon as it downloads, in any order. Defer waits until the HTML is fully parsed and runs scripts in order. For scripts that touch the DOM, defer is usually the safer choice.
How an external examiner probes, and how to handle it
- They point at your record, not a question bank. The first question is almost always 'explain this line' on the program you just ran, so re-read your own code while the previous student is being examined.
- They ask 'why' after every 'what'. 'What is post?' is followed by 'why post and not get here?'. Prepare the reason for every attribute you used.
- They change one thing and ask what happens: remove the doctype, change display to inline, delete the name attribute on the radio buttons. If you can predict the change you understand the concept.
- They test whether you copied. If your record has Bootstrap classes, they ask what col-md-6 means. If it has a jQuery line, they ask what the dollar sign is. Know every line you submitted.
- They listen for precise words: tag versus element, attribute versus property, padding versus margin. Mixing these up costs a mark even when the idea is right.
- They stop you when you ramble. A two-sentence answer followed by silence invites the next question; a two-minute answer invites an interruption.
How to say 'I don't know' without losing the viva
Never bluff a definition; one wrong one makes the examiner doubt your correct ones. Say: 'Sir, I am not sure of the exact definition, but I used it in experiment three to do X, and I think it works because Y.' That shows honesty plus partial knowledge, and most examiners then give a hint or move on. If you have no idea at all, say 'I don't know this one, sir' clearly; a quick honest pass costs less than a slow wrong answer.
What the ExamPilot AI examiner checks when you practise
In an ExamPilot CS/IT lab viva session, the AI examiner opens with a question about the program you tell it you wrote, then follows the same pattern: a line from your program, a basic, a what-if and one deeper question, for about twelve minutes. You answer out loud, exactly as in the lab. It interrupts when you ramble and probes when your answer is vague, which is the part no written question bank gives you.
You get a transcript, the questions you missed, and a shorter version of each of your answers. Run it the evening before the lab exam with your record open. Start with the CS/IT lab viva mock; the same examiner covers Python and C viva questions and DBMS and OS viva questions.
The night before: a 30-minute checklist
- 1
Re-run every program in your record
Open each file, run it, and read it line by line. Mark any line you cannot explain and look it up now; that line is the one the examiner will point at.
- 2
Say the basics out loud
Cover the basics section above without reading: HTML, tag versus element, document structure, doctype, block versus inline, id versus class, lists, links, images. If you cannot say it in three sentences, you do not have it yet.
- 3
Prepare the 'why' for your own form and table
Why post, why these input types, why a label, why colspan here, why the stylesheet is external. These questions are tied to your record and carry the most marks.
- 4
Do one what-if per topic
Remove the doctype, change the display property, delete the name on a radio group, give two elements the same id. Predict the result, then try it in the browser.
- 5
Run one spoken mock
Twelve minutes with the AI examiner, out loud. Read the transcript, shorten your long answers, and note the two topics you fumbled. Those two are your morning revision.
For the project viva at the end of the year, where questions move from syntax to design decisions, see final-year project viva questions. For the pattern of lab, project and semester vivas across branches, start with the engineering viva questions hub. If your HTML questions come in a campus placement technical round rather than a lab, pair this page with interview questions and answers for freshers.
Frequently asked questions
- What are the most commonly asked HTML viva questions?
- The same ten come up in nearly every lab: what is HTML, tag versus element, structure of an HTML document, what the doctype does, block versus inline elements, id versus class, how to create a table and a form, get versus post, the three ways to apply CSS, and the box model. After those, the examiner asks from your own record, so know every line you wrote.
- How long should a viva answer be?
- Two to four sentences, about twenty to forty seconds. Name the concept, say what it does, give one example from your own program, and stop. Examiners see ten to fifteen students an hour; a long answer gets interrupted and the interruption is what they remember. If they want more, they ask a follow-up, and that is your chance to go deeper.
- Are CSS questions asked in an HTML viva?
- Yes, almost always, because the lab is usually titled web technology or internet programming and the programs use stylesheets. Expect the three ways to apply CSS, which one has priority, the box model, margin versus padding, selectors, display versus visibility, position values and media queries. If your record uses Bootstrap, expect a question on what its grid classes mean.
- What should I say if I do not know the answer in a viva?
- Say so in one sentence and offer what you do know: 'I am not sure of the exact definition, but I used it in experiment three for the login form and I think it does X.' Examiners mark honesty with partial knowledge above a confident wrong answer, and a quick pass lets them move to a question you can score on. Never invent a definition.
- Is the HTML viva the same for BCA, B.Sc and B.Tech students?
- The question set is nearly identical because the lab syllabus is: document structure, forms, tables, lists, CSS and some HTML5. B.Tech CSE and IT labs go further into JavaScript validation and the DOM; BCA and B.Sc labs often spend more time on forms, frames and Bootstrap. In all three the examiner asks from your own record first.
- How can I practise HTML viva questions out loud?
- Reading answers is not the same as saying them under questioning. Run an ExamPilot CS/IT lab viva session: the AI examiner asks about the program you name, follows up with a what-if, interrupts when you ramble and gives you a transcript with the questions you missed. Two twelve-minute sessions the night before the lab exam cover the basics, forms, CSS and the follow-ups on this page.
Practise out loud
Practise your HTML viva out loud
The AI examiner opens your web technology program, asks a basic, a what-if and a deeper CSS question, and scores correctness, brevity and how you handle what you do not know.
Engineering Viva · CS / IT lab viva
