What is the difference between HTML, CSS, and JavaScript?
HTML (Hypertext Markup Language) is used for structuring and presenting the content of a web page.
CSS (Cascading Style Sheets) is used for styling and layout of the HTML elements.
JavaScript is a programming language that allows for interactivity and dynamic behavior on web pages.
What is the box model in CSS?
The box model in CSS describes the layout and sizing of elements. It consists of the content area, padding, border, and margin. The total width and height of an element are calculated as the sum of its content, padding, border, and margin.
What is responsive web design, and how do you achieve it?
Responsive web design is an approach to create websites that adapt to different screen sizes and devices. It ensures that the content and layout adjust automatically to provide the best user experience. Achieving responsiveness involves using fluid layouts, flexible images, and media queries in CSS.
What are media queries in CSS, and how do they work?
Media queries are CSS features that allow different styles to be applied based on various device characteristics such as screen width, height, and resolution. They are used to create responsive designs by defining different CSS rules for different screen sizes or devices.
What are the different ways to include CSS in a web page?
CSS can be included in a web page in several ways, including external style sheets, internal style sheets, and inline styles.
What is the box model in CSS?
What is the difference between margin and padding in CSS?
What is a CSS selector?
What is the difference between a class and an ID in CSS?
What is a pseudo-class in CSS?
What is the float property in CSS?
What is the difference between em and rem units in CSS?
What is a doctype in HTML?
A doctype is a declaration at the beginning of an HTML document that tells the browser which version of HTML is being used.
What is the difference between a div and a span in HTML?
What is a hyperlink in HTML?
<a> tag and the href attribute.