Posts

Showing posts with the label Interview Questions

CSS Interview Questions

Image
A List of CSS interview questions along with their answers and Code that are commonly asked by companies: 1. What is CSS, and what does it stand for? Answer: CSS stands for Cascading Style Sheets. It is a style sheet language used to describe the presentation of a document written in HTML. 2. Explain the concept of the "box model" in CSS. W ith a code example. Answer: The box model in CSS describes the layout of elements on a web page, including content, padding, border, and margin. /* Code: The box model includes content, padding, border, and margin. */ .box {    width: 200px;    padding: 20px;    border: 2px solid #333;    margin: 10px; } 3. How can you hide an element on a web page? Answer: You can set the CSS display property of the element to none . This will remove the element from the normal flow of the document, effectively hiding it. Here's an example: /* Code: Using display: none; or visibility: hidden; */ .hidden-element { display: none; } # CSS Visibi

HTML Interview Questions

Image
HTML interview questions along with their answers that are commonly asked by companies: 1. What is HTML? Answer: HTML, or HyperText Markup Language, is the standard language for creating and designing web pages. 2. Explain the structure of an HTML document. Answer: An HTML document consists of the following elements: <!DOCTYPE html> <html>   <head>     <title>Page Title</title>   </head>   <body>     <!-- Content goes here -->   </body> </html> 3. What is the purpose of the <!DOCTYPE html> declaration? Answer: It specifies the HTML version being used, and in this case, it indicates HTML5. 4. What is the difference between HTML and XHTML? Answer: XHTML is a stricter and more XML-based version of HTML. It requires well-formed documents and adheres to XML syntax rules. 5. Explain the difference between <div> and <span> elements. Answer: <div> is a block-level element used to group other HTML ele