HTML, CSS, and JavaScript are core technologies used in web development to create and enhance websites and web applications. Here’s a brief overview of each:
- HTML (Hypertext Markup Language):
- Purpose: HTML is the standard markup language used to create the structure and content of web pages.
- Role: It defines the elements and their semantic meaning on a web page, such as headings, paragraphs, lists, links, forms, images, and more.
- Example:
<h1>This is a Heading</h1>
,<p>This is a paragraph.</p>
- CSS (Cascading Style Sheets):
- Purpose: CSS is used for styling and presentation. It controls how HTML elements are displayed, including their layout, colors, fonts, and responsiveness.
- Role: It separates the content (HTML) from the presentation (CSS), allowing developers to style web pages consistently and make them visually appealing.
- Example:
h1 { color: blue; font-size: 24px; }
- JavaScript:
- Purpose: JavaScript is a versatile scripting language used to add interactivity and functionality to web pages.
- Role: It allows web developers to create dynamic elements, handle user interactions, validate forms, make asynchronous requests to servers (AJAX), and build complex web applications.
Enroll Here: HTML, CSS, and Javascript for Web Developers Certification
HTML Questions:
Question 1: Which HTML5 feature is used for offline storage of web applications?
- Local Storage
- Offline Storage
- Session Cache
- Web Storage
Question 2: In HTML, what is the purpose of the <figure> element?
- It defines a section that contains navigation links
- It represents a standalone piece of content, such as an image or diagram
- It defines a table for data presentation
- It specifies the footer of a document or section
Question 3: Which HTML5 input type is used for entering a date?
- <input type=”date”>
- <input type=”datetime”>
- <input type=”calendar”>
- <input type=”time”>
CSS Questions:
Question 1: What does the CSS property “z-index” control?
- Text alignment
- Element visibility
- The stacking order of elements
- Background color
Question 2: Which CSS selector has the highest specificity?
- ID selector (#myElement)
- Class selector (.myClass)
- Element selector (div)
- Universal selector (*)
Question 3: What is the CSS pseudo-class used to select elements that are in the process of being clicked by the user?
- :hover
- :active
- :focus
- :current
JavaScript Questions:
Question 1: In JavaScript, what is a closure?
- A function that has no return statement
- A variable declared within a function
- A function that references variables from its parent function’s scope even after the parent function has finished executing
- A function that can only be called once
Question 2: What is the purpose of the “bind” method in JavaScript?
- To concatenate two strings
- To create a new array
- To associate a function with a specific context or object
- To filter elements in an array
Question 3: Which of the following is true about the “async” attribute when including an external JavaScript file?
- It specifies that the script should be executed asynchronously, without waiting for the HTML to be fully parsed.
- It ensures that the script is executed in the order it appears in the HTML document.
- It guarantees that the script will block the rendering of the page until it is fully loaded.
- It is not a valid attribute for including external JavaScript files.
Question 4: What does the “typeof” operator return when applied to a function in JavaScript?
- “function”
- “object”
- “method”
- “undefined”
Question 5: What is the result of the expression NaN === NaN in JavaScript?
- True
- False
- Undefined
- NaN
Question 6: In JavaScript, what is the purpose of the “map” method when used with arrays?
- To remove elements from an array
- To iterate over each element of the array and return a new array with modified values
- To concatenate two arrays
- To check if an element exists in an array