Assignment: HTML & CSS
Q1. What is HTML? Explain the basic structure of HTML.
HTML (HyperText Markup Language) is used to create the structure of web pages.
It uses tags to display content like text, images, links, tables, and forms.
Basic structure includes DOCTYPE, html, head, title, and body tags.
Q2. Explain types of CSS.
CSS (Cascading Style Sheets) is used to style web pages.
1. Inline CSS – written inside HTML tags.
2. Internal CSS – written inside style tag in head section.
3. External CSS – written in a separate .css file and linked to HTML.
Q3. What is table in HTML?
An HTML table is used to display data in rows and columns using table, tr, th, and td tags.
Q4. What is list in HTML?
HTML lists are used to display related items.
Types: Ordered list, Unordered list, Description list.
Q5. Create a simple form in HTML.
HTML forms are used to collect user input like name, email, and password.
Q6. Explain selectors in CSS.
CSS selectors are used to select HTML elements for styling.
Types: Element selector, Class selector, ID selector.