Previous Next

Interview Questions on HTML

1. What is HTML?

HTML Stands For Hyper text Markup Language.
We used to write web pages which are executed in browser.

2. Where should we write styles <style> </style> in html?

Any where. It can be body, div, or head.
But we usually write in b/w  tags.

3. Where should we wirte java script code in html page?

Any where. It can be body, div, or head.

4. How to declare doctype in HTML5?

By using "<!doctype html>" at first line.

5. Explain about tags?

HTML tags are keywords (tag names) surrounded by angle brackets:
Syn :-
<tagname>content</tagname> 
Ex :- 
<p> paragraph Text </p>

6. How to write and execute HTML Page?

1. Write code in text editor like notepad,editplus or notepad++.
2. And save it as “filename.html” file.
3. Open it. It will show output in browser. 

7. What is the use of and tags?

<head> :- provides information about the document.
<body> :- provides visible content to the web page.

8. What is the use of <title> and <p> tags?

<title> :- provides title for document. 
<p> :- describes paragraph content.

9. How to provide links to another page in html?

By using anchor tag. <a>
Syntax :- <a href=”path to another page” >link name</a> 
Ex :- <a href="programmersInterview.com">This is a link</a>

10. How to open link in new tab?

Use target=”_blank”
Ex:- <a href="programmersInterview.com" target="_blank">This is a link</a>
Previous Next