Hypertext Markup Language
What does CSS stand for?
Cascading Style Sheets
What is the main purpose of HTML?
To create the structure and content of web pages.
How do you apply inline CSS to an HTML element?
By using the style attribute within the HTML tag.
Explain the purpose of the <DOCTYPE> declaration in HTML.
It specifies the document type and version of HTML being used.
How do you create a hyperlink in HTML?
Using the <a> tag with the href attribute.
How do you select an element with an id in CSS?
By using the # symbol followed by the id name
What tag is used to create a headings in HTML?
<h1> to <h6> tags.
How do you select an element with an class in CSS?
By using the . symbol followed by the class name
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.
What does the href attribute do in the <a> tag?
It specifies the URL of the page the link goes to.
What is the purpose of the position property in CSS?
It specifies the positioning method used for an element.
What is the CSS box model?
It describes the spacing and layout of an element, including content, padding, border, and margin.
How do you create a hyperlink that opens in a new tab?
By adding the target="_blank" attribute to the <a> tag.
How do you create a list in HTML? Name two types of lists.
Using <ul> for unordered lists and <ol> for ordered lists.
How do you create a comment in HTML?
By using <!-- 11A ma e mira -->.
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.
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.
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.
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.
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.
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.
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.
How do you create a responsive design in HTML?
By using CSS media queries to adjust the layout based on the device screen size.
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>.