0% found this document useful (0 votes)
13 views6 pages

Viva Questionare

The document is a comprehensive questionnaire covering HTML, CSS, web design, security topics, and practical applications. It includes questions and answers on various aspects of web development, such as element types, styling methods, webpage structures, and ethical considerations in technology. Each section provides clear definitions, examples, and explanations relevant to the topics discussed.

Uploaded by

Anshika Thapar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views6 pages

Viva Questionare

The document is a comprehensive questionnaire covering HTML, CSS, web design, security topics, and practical applications. It includes questions and answers on various aspects of web development, such as element types, styling methods, webpage structures, and ethical considerations in technology. Each section provides clear definitions, examples, and explanations relevant to the topics discussed.

Uploaded by

Anshika Thapar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

VIVA QUESTIONARE

HTML Basics

3. What is the difference between block-level and inline-level elements in HTML?


Answer: Block-level elements, like <div> and <p>, take up the full width of their
container, while inline-level elements, like <span> and <a>, take up only as much width
as necessary.
4. What is the purpose of the <head> section in an HTML file?
Answer: The <head> section contains meta-information about the document, such as the
title, links to stylesheets, and scripts.
5. How do you include an image in an HTML webpage?
Answer: Using the <img> tag with the src attribute to specify the image's path and alt
for alternative text. Example:

html
CopyEdit
<img src="image.jpg" alt="Description of image">

CSS Basics

6. What is the difference between inline, internal, and external CSS?


Answer:
o Inline CSS: Defined directly within an HTML tag using the style attribute.
o Internal CSS: Defined within the <style> tag in the <head> section of an
HTML file.
o External CSS: Stored in a separate .css file and linked to the HTML document
using <link>.
7. How can you apply a specific style to multiple elements in CSS?
Answer: By using class selectors with the . prefix or grouping multiple elements in the
CSS rule. Example:

css
CopyEdit
.class-name { color: blue; }
p, h1 { font-family: Arial; }

Web Design and Layout

8. What is a static webpage? How does it differ from a dynamic webpage?


Answer: A static webpage displays fixed content that doesn't change unless the code is
modified. A dynamic webpage, on the other hand, updates content based on user
interaction or data from a server.
9. How can you create a navigation bar in HTML?
Answer: Using an unordered list (<ul>) with list items (<li>) containing hyperlinks
(<a>). Example:

html
CopyEdit
<ul>
<li><a href="home.html">Home</a></li>
<li><a href="about.html">About</a></li>
</ul>

10. What is the significance of using frames in a webpage?


Answer: Frames allow dividing a webpage into multiple sections, each displaying
different content or documents.

Advanced HTML and CSS

11. What is the use of the <iframe> tag?


Answer: The <iframe> tag embeds another HTML document within a webpage.
12. How can you make a webpage responsive using CSS?
Answer: By using media queries and flexible layouts. Example:

css
CopyEdit
@media (max-width: 600px) {
body { font-size: 12px; }
}

13. Explain the difference between absolute and relative URLs.


Answer:
o Absolute URL: Specifies the full path, including the domain name (e.g.,
https://example.com/page.html).
o Relative URL: Specifies the path relative to the current document's location (e.g.,
page.html).

Security and Ethical Topics

14. What are some common types of computer viruses?


Answer: Examples include file-infecting viruses, macro viruses, boot sector viruses, and
polymorphic viruses.
15. How do antivirus programs detect and remove malware?
Answer: They use signature-based detection, heuristic analysis, and real-time monitoring
to identify and eliminate threats.
16. What is spam, and how can it be prevented?
Answer: Spam refers to unsolicited messages, often sent in bulk. It can be prevented by
using spam filters, blocking suspicious emails, and not sharing email addresses publicly.
17. Why is intellectual property protection important in the digital age?
Answer: It ensures creators are credited for their work, prevents unauthorized use, and
promotes innovation by protecting rights to creations like software, art, and inventions.
18. What is the difference between copyright infringement and plagiarism?
Answer:
o Copyright infringement: Unauthorized use of copyrighted material.
o Plagiarism: Using someone else's work without giving proper credit, even if it's
not protected by copyright.

Practical Task-Specific

19. Why is indentation important in HTML code?


Answer: Indentation improves code readability and helps in identifying the structure of
nested elements.
20. How do you create a table with a border in HTML?
Answer: Using the <table> tag with the border attribute. Example:

html
CopyEdit
<table border="1">
<tr>
<td>Data</td>
</tr>
</table>

21. What is the difference between ordered and unordered lists in HTML?
Answer: Ordered lists (<ol>) display items with numbers or letters, while unordered lists
(<ul>) display items with bullet points.

HTML Basics (1 marker)

1. Which tag is used to define the largest heading in HTML?


Answer: <h1>
2. How do you create a line break in HTML?
Answer: <br>
3. What is the purpose of the <title> tag?
Answer: It defines the title displayed on the browser tab.
4. Which attribute is used to add a hyperlink to an element?
Answer: href
5. Write the HTML code to display an image with alternate text "My Image."
Answer:

html
CopyEdit
<img src="image.jpg" alt="My Image">

6. What does the <ul> tag stand for?


Answer: Unordered List

CSS Basics

7. What is the correct syntax to add an external CSS file?


Answer:

html
CopyEdit
<link rel="stylesheet" href="style.css">

8. Which property is used to change the background color of a webpage?


Answer: background-color
9. How do you make text bold in CSS?
Answer: Using the font-weight property, e.g., font-weight: bold;
10. What is the default position of an HTML element in the CSS box model?
Answer: Static
11. How can you apply the same CSS style to multiple elements?
Answer: By using a class selector (.) or grouping element selectors.

HTML and CSS Implementation

12. Which HTML tag is used to link a CSS file?


Answer: <link>
13. Write a CSS rule to set all <p> elements to have a font size of 14px.
Answer:

css
CopyEdit
p {
font-size: 14px;
}

14. How do you apply a background image to a webpage in CSS?


Answer:
css
CopyEdit
body {
background-image: url('image.jpg');
}

15. What is the difference between an ID selector and a class selector in CSS?
Answer: An ID selector (#id) applies to one unique element, while a class selector
(.class) can be used for multiple elements.
16. How do you add a comment in CSS?
Answer:

css
CopyEdit
/* This is a comment */

HTML Tags and Attributes

17. Which attribute is used to set an image's height in HTML?


Answer: height
18. What is the function of the <th> tag in HTML?
Answer: It defines a header cell in a table.
19. Write the HTML code for a hyperlink that opens in a new tab.
Answer:

html
CopyEdit
<a href="https://example.com" target="_blank">Link</a>

20. Which tag is used to group table rows in HTML?


Answer: <tbody>

Specific Practical Applications

21. How do you specify a form's method in HTML?


Answer: Using the method attribute (GET or POST).
22. Write the HTML code for a checkbox input.
Answer:

html
CopyEdit
<input type="checkbox" name="option" value="1">

23. What is the role of the <fieldset> tag in a form?


Answer: It groups related elements in a form.
24. Which tag is used to create a dropdown list in HTML?
Answer: <select>
25. Write the code to create a simple numbered list in HTML.
Answer:

html
CopyEdit
<ol>
<li>Item 1</li>
<li>Item 2</li>
</ol>

Frames and Layout

26. Which tag is used to create frames in HTML?


Answer: <frameset>
27. Write the HTML code to divide a page into two columns using frames.
Answer:

html
CopyEdit
<frameset cols="50%,50%">
<frame src="left.html">
<frame src="right.html">
</frameset>

28. What is the alternative to frames for modern web design?


Answer: <div> with CSS or <iframe>

Security and Ethical Topics

29. What is malware?


Answer: Malicious software designed to harm or exploit systems.
30. What does an antivirus do?
Answer: Detects and removes malware from a computer.
31. How can plagiarism be detected?
Answer: Using plagiarism detection tools like Turnitin or Copyscape.
32. Which HTML tag is used to display preformatted text?
Answer: <pre>
33. What does the <meta> tag do?
Answer: It provides metadata about the HTML document, such as character set and
keywords.

You might also like