HTML & CSS Theory-Based Assignment Questions
1. HTML Structure
Explain the basic structure of an HTML document. What is the purpose of the <!DOCTYPE
html> declaration and the <head> and <body> sections?
2. Semantic Elements
What are semantic HTML elements? Give examples and explain why using semantic tags is
better than non-semantic ones.
3. Difference Between Inline, Block, and Inline-Block Elements
Differentiate between inline, block, and inline-block elements in HTML. Give at least two
examples of each.
4. Forms and Input Types
Describe the purpose of HTML forms. List and explain five different input types supported
in HTML5.
5. CSS Selectors
What are CSS selectors? Explain the difference between class selectors, ID selectors, and
element selectors with examples.
6. CSS Box Model
Explain the CSS box model in detail. What are margin, border, padding, and content, and
how do they affect layout.
7. Positioning in CSS
Describe the different position property values in CSS (static, relative, absolute, fixed,
sticky) and their uses.
8. Responsive Design
What is responsive web design? How do media queries help in creating responsive layouts.
9. Difference Between HTML and CSS
Differentiate between HTML and CSS. Why are both needed for web development.
10. External, Internal, and Inline CSS
Explain the three methods of adding CSS to a webpage: inline, internal, and external.
Mention one advantage and disadvantage of each.