1
2
3
4
5
100
What does HTML stand for?

Hypertext Markup Language

100

What does CSS stand for?

Cascading Style Sheets

100

What is the main purpose of HTML?

To create the structure and content of web pages.

100

How do you apply inline CSS to an HTML element?

By using the style attribute within the HTML tag.

100

Explain the purpose of the <DOCTYPE> declaration in HTML.

It specifies the document type and version of HTML being used.

200

How do you create a hyperlink in HTML?

Using the <a> tag with the href attribute.

200

How do you select an element with an id in CSS?

By using the # symbol followed by the id name

200

What tag is used to create a headings in HTML?

<h1> to <h6> tags.

200

How do you select an element with an class in CSS?

By using the . symbol followed by the class name

200

What is the difference between margin and padding in CSS?

Margin is the space outside the border of an element, while padding is the space between the content and the border of an element.

300

What does the href attribute do in the <a> tag?

It specifies the URL of the page the link goes to.

300

What is the purpose of the position property in CSS?

It specifies the positioning method used for an element.

300

What is the CSS box model?

It describes the spacing and layout of an element, including content, padding, border, and margin.

300

How do you create a hyperlink that opens in a new tab?

By adding the target="_blank" attribute to the <a> tag.

300

How do you create a list in HTML? Name two types of lists.

Using <ul> for unordered lists and <ol> for ordered lists.

400

How do you create a comment in HTML?

By using <!-- 11A ma e mira -->.

400

Explain the difference between <section>, <article>, and <div> tags in HTML

<section> defines a section in a document, <article> defines an independent, self-contained content, and <div> is a generic container.

400

What is the difference between visibility: hidden and display: none?

visibility: hidden hides an element while still taking up space, whereas display: none removes the element from the document flow entirely.

400

What is the role of the alt attribute in the <img> tag?

It provides alternative text for an image, which is displayed if the image cannot be loaded or accessed.

400

How do you create a CSS animation?

By using the @keyframes rule to define the animation's keyframes and applying it to an element using the animation property.

500

What are pseudo-classes in CSS? Provide examples.

Pseudo-classes are used to define the special state of an element. Examples include :hover, :active, :focus, etc.

500

What are semantic elements in HTML? Provide examples.

Semantic elements convey meaning to both the browser and the developer. Examples include <header>, <footer>, <nav>, <article>, <section>, <aside>, <main>, etc.

500

Explain the difference between the <button> and <input type="button"> tags

<button> creates a clickable button, while <input type="button"> creates a button using an input element.

500

How do you create a responsive design in HTML?

By using CSS media queries to adjust the layout based on the device screen size.

500

How do you embed a video in an HTML document? Provide an example of a video embedding code.

Using the <video> tag. Example: <video src="movie.mp4" controls></video>.

M
e
n
u