HTML5 DOCTYPE Declaration and Web Development Basics

Company: Scaler SDE intern OA_16feb

Difficulty: medium

Problem Statement

Question 1

The declaration in HTML5 is

Question 2

Can we align a Block element by setting the left and right margins?

Question 3

If we want to define style for a unique element, then which CSS selector will we use?

Question 4

What would be the output of the following code? (function () { console.log("Original salary was " + salary); var salary = "5000$"; console.log("My New Salary " + salary); })();

Question 5

What's the difference between localStorage and sessionStorage?

Question 6

What will happen to dogs array after running this code? const dogs = ["Fido", "Odie", "Oscar"] dogs.length; dogs.length = 1;