WT Cit 1 Imp 2m
WT Cit 1 Imp 2m
<div class="grid-container">
<div class="grid-item">A</div>
<div class="grid-item">B</div>
<div class="grid-item">C</div>
<div class="grid-item">D</div>
</div>
</body>
</html>
7. How will you embed the external style sheet?
<html>
<head>
<title>My HTML Document</title>
<link rel="stylesheet" href="styles.css">
</head>
</html>
8. How will you put a link for image with example?
<body>
<a href="https://example.com">
<img src="image.jpg" alt="Description of the image">
</a>
</body>
9. List the advantages of javascript
• It can be used for client-side and server-side, front end and back
end
• It provides dynamism and interactivity on websites
• It runs on multiple platforms and devices
• It allows for cross-platform compatibility
• It’s supported by all major web browsers
• There are many libraries, frameworks, and APIs available to
facilitate tasks
10.How to create arrays in javascript?
There are two ways to create arrays in JavaScript
• Using Array Literals
• Using the Array Constructor
Example for Using Array Literals:
• let numbers = [1, 2, 3, 4, 5];
Example for Using the Array Constructor:
• let numbers = new Array(1, 2, 3, 4, 5);
• let emptyArray = new Array();
11. List the types of pop up boxes available in javascript
• Alert box
• Confirm box
• Prompt box
12.Give some methods of data objects
Array Methods:
• push()
• pop()
String Methods:
• substring()
• split()
Object Methods:
• Object.keys()
• Object.values()
Map Methods:
• set()
• get()
13.How scripting language is differ from the HTML?
14.Difference between HTML and DHTML