HTML Interview Questions

HTML Interview Questions

HTML Interview Questions

1) What is HTML?

Answer:

It stands for Hyper Text Markup Language. It is a language of World Wide Web. It is a standard text information language that is employed to form and show pages on the Web page.


2) What are Tags?

Answer:

 HTML tags are composed of only three things: opening tag, content and ending tag. Some tags are unclosed tags. HTML documents are made of two things; they are content, and tags

Content is placed between tags to shows data on the web browser.


3) Do all HTML tags have end tag?

Answer:

No. There are few HTML tags that don’t need a closing tag. For example: <img> tag, <hr> tag.


4) What are some common lists that are used when designing a page?

Answer:

There are several common lists which are used to design a page. You can opt any or a combination of the following list types:

  •     Ordered list
  •     Unordered list
  •     Menu list
  •     Directory list
  •     Definition list

5) What is the difference between HTML elements and tags?

Answer:

HTML elements are to communicate the browser to render text. When the elements are covered both side with brackets <>, they form HTML tags. Most of the time, tags are available to try in pair and surround content.


6) What is semantic HTML?

Answer:

Semantic HTML is a coding style. It is the use of HTML markup to strengthen the semantics or meaning of the content. For example: In semantic HTML <b> </b> tag is not used for bold statement as well as <i> </i> tag is used for italic. Instead of these we use <strong></strong> and <em></em> tags.


7) What is image map?

Answer:

Image map facilitates you link to many different web pages or web sites using a single image. You’ll outline shapes in images that you want to make part of an image mapping.


8) How to insert a copyright symbol on a browser page?

Answer:

Can be done by giving &copy; or &#169; in an HTML file.


9) How do you keep list elements straight in an HTML file?

Answer:

We can keep the list elements straight by using indents.


10) Does a hyperlink only apply to text?

Answer:

No, you can use hyperlinks on text and images too.


11) What is a style sheet?

Answer:

A style sheet is used to build a consistent, movable, and well designed style template. You can add these templates on several different web pages and can apply in different types.


12) Can you create a multi colored text on a web page?

Answer:

Yes. To create a multicolor text on a web page you can use <font color =”color”> </font> for the specific texts you want to color.


13) Is it possible to change the color of the bullet?

Answer:

Yes, the color of the bullet is always the color of the first text of the list. So, if you wanna change the color of the bullet, you must change the color of the text.


14) What is a marquee?

Answer:

Marquee is used to get the scrolling text on a web page. You should put the text which you want to scroll within the <marquee>……</marquee> tag.


15) How many tags can be used to separate section of texts?

Answer:

Three tags are there, to separate the texts. i.e.. usually <br> tag is used to separate line of texts. Other tags are <p> tag and <blockquote> tag.


16) How to make a picture a background image of a web page?

Answer:

To make a picture a background image on a web page, you should put the following tag code after the </head> tag.

<body background = “image1.gif”> 

Here, replace the “image1.gif” with the name of your image file name which you want to display on your web page.


17) What are empty elements?

Answer:

HTML elements with no content are referred to as  empty elements. For example: <br>, <hr> etc.


18) What is the use of span tag? Give one example.

Answer:

The span tag is used for following things like:

  •     For adding color on text
  •     For adding background on text
  •     Highlight any color text etc.

Example:

<p>

<span style=”color:#ffffff;”>

In this page we use span.

</span>

</p>


19) What is the use of iframe tag?

Answer:

An iframe is used to show a web page within a web page.

Syntax:

<iframe src=”URL”></iframe>

Example:

<iframe src=”demo_iframe.html” width=”200px” height=”200px”></iframe>

Target to a link:

<iframe src=”http://www.nareshit.com” name=”iframe_a”></iframe>


Also Read :  HTML5 and CSS Interview Questions

Share this post


Specialization on Trending Courses