In this article, we will see some HTML interview questions I faced during interviews.
So let’s start,
1)What is Doctype in html?
All HTML documents must start with a <!DOCTYPE> declaration.
The declaration is not an HTML tag. It is an “information” to the browser about what document type to expect.
In HTML 5,
the declaration is simple:
**Note:**The <!DOCTYPE> declaration is NOT case sensitive.
2)What is DOM in html?
The DOM (Document Object Model)is a W3C (World Wide Web Consortium) standard.
The DOM defines a standard for accessing documents:
The HTML DOM is a standard object model and programming interface for HTML.
When a web page is loaded, the browser creates a Document Object Model of the page.
It defines:
The HTML elements as objects
The properties of all HTML elements
The methods to access all HTML elements
The events for all HTML elements
In other words:
The HTML DOM is a standard for how to get, change, add, or delete HTML elements.
#html #interview