HTML Assignment – 2

Basic Questions

  1. Create an ordered list (<ol>) of 5 fruits.
  2. Create an unordered list (<ul>) of 5 countries.
  3. Create a nested list with one main item “Programming Languages” containing “JavaScript, Python, Java”.
  4. Make a description list (<dl>) of 3 terms with their definitions.
  5. Create an unordered list of your hobbies.
  6. Create a simple hyperlink using <a> that links to “https://www.google.com”.
  7. Add a link to an external website (e.g., YouTube).
  8. Create a relative link to a page called about.html.
  9. Create an anchor link that jumps to a section with the ID #contact.
  10. Make a link that opens in a new tab using target=”_blank”.
  11. Insert an image using <img> with src and alt attributes.
  12. Add an image with a title attribute that shows text on hover.
  13. Resize an image to 200px width and 150px height.
  14. Insert an image and make it clickable (link to Google).
  15. Add an image with a missing src and give it a proper alt text.
  16. Create a table with 2 rows and 2 columns.
  17. Add a table with a header row using <th>.
  18. Create a table with 3 columns: Name, Age, Country.
  19. Add borders to a table using border=”1″.
  20. Create a table with one cell spanning 2 columns using colspan.

Intermediate Questions

  1. Create an ordered list of 5 car brands and change the numbering type (e.g., Roman numerals).
  2. Create an unordered list of 5 subjects and use a square bullet style.
  3. Make a nested list of “Frontend” (HTML, CSS, JavaScript) and “Backend” (Node.js, MongoDB, MySQL).
  4. Create a description list (<dl>) for 5 programming concepts.
  5. Create an anchor link at the top of the page that jumps to the bottom section.
  6. Add a download link for a file named resume.pdf.
  7. Create a link with both href and title attributes.
  8. Make a link to an external site and style it as bold text.
  9. Create a link that opens a YouTube video in a new tab.
  10. Add a relative link to images/picture.jpg.
  11. Insert an image with width=”50%” for responsive scaling.
  12. Use srcset to add two versions of the same image for responsive display.
  13. Create an image with both title and alt attributes.
  14. Insert an image and align it to the center using HTML attributes.
  15. Create an image that links to another section of the same page.
  16. Create a table with 4 rows and 3 columns showing “Students & Marks”.
  17. Add a table with both column headers (<th>) and data (<td>).
  18. Use rowspan to merge two rows in a table.
  19. Add cellspacing and cellpadding attributes to a table.
  20. Create a table with borders, column headers, and at least 5 rows of data.

Advanced Questions

  1. Create a nested list that represents a menu (Main: Food → Fruits, Vegetables; Drinks → Tea, Coffee).
  2. Build a list of links inside an unordered list (like a navigation menu).
  3. Create an ordered list where one item itself contains an unordered list.
  4. Add multiple anchor links on the page for “Home, About, Contact” sections.
  5. Create an image that acts as a download link (click image → download file).
  6. Insert an image using srcset for desktop and mobile versions.
  7. Create an image map with clickable areas inside an image (e.g., world map linking to countries).
  8. Build a student result table with rowspan and colspan for subject-wise marks.
  9. Create a styled table with borders, background colors, and alternate row shading using CSS.
  10. Make a fully responsive table that scrolls horizontally on small screens.