=

Q. 1) What is HTML?

 

HTML is short for HyperText Markup Language and is the language of the World Wide Web. It is the standard text formatting language used for creating and displaying pages on

Q. What is HTML and what is it used for?

HTML is a widely used language that gives our webpage a structure. HTML stands for HYPERTEXT MARKUP LANGUAGE. HTML was created by Berners lee in 1991. A markup language is a set of markups

Q. Who is the author of HTML?

Sir Tim Berners-Lee, a great physicist who is a great personality is the author of HTML. He is also the director of the World Wide Web Consortium i.e. W3C. He is also the founder of WWWF i

Q. What is the meaning of markup in HTML?

The sequence of characters or other symbols which we usually use to insert at certain places in a word or text file in order to indicate how the file should look when it is displayed or pr

Q. What is a physical tag and logical tag in HTML?

A Physical tag has physical text which is used to tell the browser how to display the text enclosed in the physical tag. Example for the physical tags are: <big>, <b>,

Q. What is Anchor tag and how can you open an URL into a new tab when clicked?

 Anchor tag in HTML is used for linking between two sections or two different web pages or website templates.

To open an url into a new tab in the browser upon a click, we need to add target attribute equal to _blank.

<a href=”#” target=”_blank”></a>

Q. Define Semantic elements in HTML.

Semantic elements are HTML elements which represent its meaning to the browser and developer about its contents.

For Example – p tag represents a paragraph, a tag represents anchor tag, form tag, table tag, article tag and many more are semantic elements in HTML. Whereas div tag, span tag, bold tag are not semantic elements.

Q. Define attributes in HTML tag

The HTML tag contains a field inside their tag which is called attributes of that tag.

For Example:

 

<img src=”#”> here in this tag src is img tag attributes.

<input type=” text”> here in this tag type is input tag attributes.

Q. Can we modify the attribute’s value of the HTML tag dynamically?

Ans: Yes, we can modify the value of the attributes by using JavaScript.

Below is the input element whose attribute will be modified from text to password, JS code to modify the attribute value:

<input type=“text” id=“inputField”>
document.getElementById(“inputField”).attr(“type”, “password”);

Q. How can we comment in HTML?

Ans: Comments are used by developers to keep a track of the code functionality and also help the other developers in understanding the code functionalities easily.

The commented out lines will not be shown in the browser. To comment a line, the line should start by this <!– and end by this –>. Comments can be of one line or of multiple lines.

For Example:

<!-- This is one line comment ?
<!-- This is multiple
line of two or
more line -->

Q. Can we change inline elements into block-level elements?

Ans: Yes, we can change inline elements into block-level elements by adding display equal to block in its CSS tag. Writing it will change the inline elements into block elements and then inline elements will also take the full width of the container.

display: block;

Q. What are <br> tags in HTML?

Ans: <br> tags are used to enter a new line into the HTML contents. These tags are generally used to separate two different lines of text between each other.

Q. Why Meta tags are used in HTML?

Ans: Meta tags in html are used by the developer to tell the browser about the page description, author of the template, character set, keywords and many more.

Meta tags are used for search engine optimization to tell the search engine about the page contents.

<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale = 1.0">
<meta name="description" content="HTML interview questions">
<meta name="author" content="Author Name">
<meta name="copyright" content="All Rights Reserved">

Q. How can we create a hyperlink in HTML?

Ans: An anchor tag or <a> tag in HTML is used to create hyperlinks which create a path between two different HTML web pages.

Hyperlinks can be displayed in three ways:

Unvisited Link – These links are blue in color and underlined.
Visited Link – These links are purple in color and underlined.
Active Link – These links are red in color and underlined.

Q. Why do we use the required attribute in HTML?

Ans: The required attribute is used in HTML to make the field mandatory. It forces the user to fill that particular field to submit the form.

If the field is input then it will throw a default HTML error.

<input type="email" name = "user_email" required />

Q. Differentiate between HTML and XHTML.

HTML stands for Hypertext Markup Language, whereas XHTML stands for Extensible Markup Language.
A static webpage is an html web page and dynamic web pages are XHTML.
XHTML are more stricter than HTML.
An XML application of HTML is defined as XHTML.
All modern browsers support XHTML.

Q. What Are The Various Style Sheets?

Answer : Inline, external, imported and embedded are the different types of style sheets.

Q. What Is A Tag?

Answer : In HTML, a tag tells the browser what to do. When you write an HTML page, you enter tags for many reasons -- to change the appearance of text, to show a graphic, or to make a link to another page.

Q. What Is A Hypertext Link?

Answer :  A hypertext link is a special tag that links one page to another page or resource. If you click the link, the browser jumps to the link's destination.

Q. Do all HTML tags have an end tag?

No. There are some HTML tags that don't need a closing tag. For example: <image> tag, <br> tag.

Question topic


HTML

43 Questions

HTML5

9 Questions

CSS

1 Questions

JavaScript

0 Questions

PHP

0 Questions

ASP.NET

0 Questions

JSP

0 Questions

SQL

0 Questions

MySQL

0 Questions

Core Java

0 Questions

Interview Tips

12 Questions

Job/HR Interview

48 Questions

Competency Interview

9 Questions

Business Analyst

24 Questions

Behavioral Interview

4 Questions

IBM Interview

85 Questions

Infosys Interview

106 Questions

Capgemini Interview

0 Questions

Cognizant Interview

0 Questions

Wipro Interview

0 Questions

Accenture Interview

0 Questions

IGATE Interview

0 Questions

TCS Interview

0 Questions

HCL Recruitment Process

0 Questions

Adobe Interview

0 Questions

Microsoft Interview

0 Questions

DXC Technology Interview

0 Questions

Ericsson Interview

0 Questions

Intuit Recruitment Process

0 Questions

SpaceX Interview

0 Questions

Sapient Interview

0 Questions

Programming C Interview

0 Questions

C++ Interview

0 Questions

Data Structure Interview

0 Questions

Linux Interview

0 Questions

Unix Interview

0 Questions

Shell Scripting Interview

0 Questions

Networking Interview

0 Questions

CCNA Interview

0 Questions

Android Interview

0 Questions

Cloud Computing Interview

0 Questions

Hadoop Interview

0 Questions

Software Testing Interview

0 Questions

Selenium Interview

0 Questions

Web Services Interview

0 Questions

Operating System Interview

0 Questions

MS Excel Interview

0 Questions

SEO Interview

0 Questions

Digital Marketing Interview

0 Questions

Python Interview

0 Questions

Django Interview

0 Questions

Pascal Interview

0 Questions

Ruby Interview

0 Questions

Ruby on Rails Interview

0 Questions

Memcached Interview

0 Questions

Go Interview

0 Questions

OpenStack Interview

0 Questions

Scala Interview

0 Questions

Control System Interview

0 Questions

Electrical Machines Interview

0 Questions

Power System Interview

0 Questions

Digital Electronics Interview

0 Questions

Robotics Interview

0 Questions

TypeScript Interview

0 Questions