0% found this document useful (0 votes)
31 views2 pages

HTML & CSS Exam Questions Guide

The document contains a comprehensive overview of HTML and CSS, structured into ten sections covering topics such as HTML basics, block and inline elements, attributes, forms, HTML5 tags, CSS introduction, fonts, text properties, and the box model. Each section includes specific questions and prompts related to the respective topics, aimed at testing knowledge and understanding of web development concepts. It serves as a guide for learners to grasp foundational web technologies.

Uploaded by

doshic21
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)
31 views2 pages

HTML & CSS Exam Questions Guide

The document contains a comprehensive overview of HTML and CSS, structured into ten sections covering topics such as HTML basics, block and inline elements, attributes, forms, HTML5 tags, CSS introduction, fonts, text properties, and the box model. Each section includes specific questions and prompts related to the respective topics, aimed at testing knowledge and understanding of web development concepts. It serves as a guide for learners to grasp foundational web technologies.

Uploaded by

doshic21
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

🔹 Section 1: HTML Basics

1. What is the full form of HTML?


2. Which tag is used to define the structure of an HTML document?
3. What does the <title> tag do?
4. What is the difference between <head> and <body>?
5. Which HTML tag is used to create a paragraph?

🔹 Section 2: Block & Inline Elements

6. Give two examples of block-level elements.


7. Give two examples of inline-level elements.
8. Is <p> a block or inline element?
9. What does the <sup> tag do?
10. What is the purpose of the <mark> tag?

🔹 Section 3: HTML Tag Attributes

11. What does the type attribute in <ol> do?


12. Write the correct syntax for a list starting at number 5.
13. What is the use of the align attribute?

🔹 Section 4: Images, Marquee & Anchor

14. Write the HTML syntax to display an image named [Link].


15. What does the alt attribute in an image tag do?
16. Which attribute is used to open a link in a new tab?
17. Write an anchor tag to open [Link] in a new tab.
18. What is the purpose of the <marquee> tag?
19. Which attribute controls the speed in a <marquee> tag?

🔹 Section 5: HTML Forms

20. Write the syntax of a basic form tag.


21. Name any 5 input types used in HTML.
22. Which tag is used for a drop-down menu?
23. How is a textarea different from a text input?
24. What is the use of the name attribute in form inputs?
🔹 Section 6: HTML5 Tags

25. List any four HTML5 semantic tags.


26. What is the purpose of the <audio> tag?
27. Which attribute is used to automatically play audio or video?
28. What is the <iframe> tag used for?
29. Write the syntax for embedding a YouTube video in an iframe.
30. What is the correct tag to include a favicon?

🔹 Section 7: CSS Introduction

31. What is the full form of CSS?


32. Name three types of CSS.
33. How do you link an external CSS file to an HTML file?
34. What is the correct syntax to apply a class in CSS?
35. What is the difference between .class and #id?

🔹 Section 8: Fonts and Icons

36. What is the syntax for applying an offline font in CSS?


37. Name any one website to get free icons for web design.
38. How do you include an online font using Google Fonts?
39. What does font-weight property control?
40. Which CSS property changes the case of text?

🔹 Section 9: Text Properties

41. What property is used to change the text color?


42. What does text-align: justify do?
43. Define line-height and letter-spacing.
44. What is the use of text-decoration?

🔹 Section 10: Box Model & Layout

45. Explain the CSS box model.


46. What is the use of box-sizing: border-box?
47. How do you make a box with rounded corners?
48. Define the clear: both property with a real-life example.
49. What is the difference between display: none and visibility: hidden?
50. What does float: right do?

Common questions

Powered by AI

Block-level elements start on a new line and take up the full width available, examples include <div> and <p>. Inline-level elements do not start on a new line and only take as much width as necessary, examples include <span> and <a> .

Google's web fonts enhance web design by offering a wide variety of easily accessible fonts without the need to host them locally. They provide optimization for speed and performance across devices and support international characters, enhancing the visual appeal and accessibility of web pages .

A web designer might use an <iframe> tag to embed multimedia content like YouTube videos because it allows for the independent loading of dynamic content without affecting the main page's performance. It also enables isolation of embedded content for security reasons .

The 'type' attribute in an <ol> tag dictates the style of numbering used for the list items, such as numbers, lowercase letters, uppercase letters, and Roman numerals .

'Display: none' completely removes an element from the document layout, meaning it does not occupy any space. 'Visibility: hidden' makes the element invisible but preserves the space it occupies. 'Display: none' can improve rendering performance by reducing page complexity, while 'visibility: hidden' is useful when maintaining layout integrity without showing certain elements .

Setting 'text-decoration: none' is used to remove default styles such as underlines from text elements, particularly hyperlinks, in order to achieve a desired aesthetic or to conform to specific design guidelines .

The 'alt' attribute provides a text alternative for an image, which is crucial for accessibility. It ensures that users who cannot view the image, such as those using screen readers, can still understand its context and purpose .

Using semantic HTML5 tags is important for enhancing accessibility, search engine optimization, and overall understanding of web content structures by parsers and browsers. Common examples include <article>, <section>, <nav>, and <footer> .

The 'box-sizing: border-box' CSS property ensures that padding and border are included in an element's total width and height. This prevents elements from overflowing their containers and simplifies the design of responsive layouts .

The 'float: right' property in CSS moves an element to the right side of its containing element, allowing text and other elements to wrap around it. This is useful for positioning images and creating sidebars .

You might also like