0% found this document useful (0 votes)
1 views1 page

Javascript VIVA Questions

The document lists a series of questions and answers related to HTML, CSS, and JavaScript. It covers fundamental concepts such as the purpose of various HTML tags, CSS properties, and JavaScript functionalities. Each question is followed by a concise answer, making it a useful resource for quick reference or study.

Uploaded by

salemazbar528
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)
1 views1 page

Javascript VIVA Questions

The document lists a series of questions and answers related to HTML, CSS, and JavaScript. It covers fundamental concepts such as the purpose of various HTML tags, CSS properties, and JavaScript functionalities. Each question is followed by a concise answer, making it a useful resource for quick reference or study.

Uploaded by

salemazbar528
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

Javascript VIVA questions

HTML Questions
1. What does HTML stand for? → HyperText Markup Language.
2. What is the purpose of <title> tag? → Sets the page title shown in browser tab.
3. Difference between <div> and <span>? → <div> is block-level, <span> is inline.
4. What is the use of <br> tag? → Inserts a line break.
5. What is the difference between <ol> and <ul>? → <ol> is numbered list, <ul> is
bulleted list.
6. What is the use of <img> tag? → Displays an image.
7. What is the purpose of alt attribute in <img>? → Shows text if image fails to load.
8. What is the difference between <id> and <class>? → id is unique, class can be
reused.
9. What is the use of <form> tag? → Collects user input.
10. What is the difference between <link> and <a>? → <link> connects external files,
<a> creates hyperlinks.

CSS Questions
11. What does CSS stand for? → Cascading Style Sheets.
12. Difference between inline, internal, and external CSS? → Inline: inside tag,
Internal: in <style>, External: separate file.
13. What is the use of color property? → Changes text color.
14. What is the difference between position: relative and position: absolute?
→ Relative: moves based on itself, Absolute: moves based on parent.
15. What is the difference between id and class selectors in CSS? → #id for one
element, .class for many.
16. What is the use of background-color property? → Sets background color of an
element.
17. What is the difference between inline-block and block elements? → Inline-
block allows elements side by side, block takes full width.

JavaScript Questions
18. What does JavaScript do in a webpage? → helpful create dynamic web pages.
19. Difference between var, let, and const? → var is old, let is block-scoped, const
cannot change.
20. Difference between == and ===? → == checks value, === checks value + type.
21. What is DOM? → Document Object Model, structure of webpage.
22. What is an array in JavaScript? → A list of values stored together.
23. What is a function in JavaScript? → A block of code that performs a task.
24. What is the difference between for...in and for...of loops? → for...in for
object properties, for...of for array values.

You might also like