Home / Interview / HTML :: General Questions

Interview :: HTML

1) What is HTML?

HTML stands for Hyper Text Markup Language. It is a language of World Wide Web. It is a standard text formatting language which is used to create and display pages on the Web. It makes the text more interactive and dynamic. It can turn text into images, tables, links.

2) What are Tags?

HTML tags are composed of three things: an opening tag, content and ending tag. Some tags are unclosed tags.

HTML documents contain two things:

  • content, and
  • tags

When a web browser reads an HTML document, the browser reads it from top to bottom and left to right. HTML tags are used to create HTML documents and render their properties. Each HTML tags have different properties.

Syntax

Content is placed between tags to display data on the web page.

3) Do all HTML tags have an end tag?

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

4) What is formatting in HTML?

The HTML formatting is a process of format the text for a better look and feel. It uses different tags to make text bold, italicized, underlined.

5)

How many types of heading does an HTML contain?

The HTML contains six types of headings which are defined with the

to tags. Each type of heading tag displays different text size from another. So, is the largest heading tag and is the smallest one. For example:

 

6) How to create a hyperlink in HTML?

The HTML provides an anchor tag to create a hyperlink that links one page to another page. These tags can appear in any of the following ways:

  • Unvisited link - It is displayed, underlined and blue.
  • Visited link - It is displayed, underlined and purple.
  • Active link - It is displayed, underlined and red.
7) Which HTML tag is used to display the data in the tabular form?

The HTML table tag is used to display data in tabular form (row * column). It also manages the layout of the page, e.g., header section, navigation bar, body content, footer section. Here is the list of tags used while displaying the data in the tabular form:

TagDescription
element to specify column properties for each column.
It defines a table.
It defines a row in a table.
It defines a header cell in a table.
It defines a cell in a table.
It defines the table caption.
It specifies a group of one or more columns in a table for formatting.
It is used with
It is used to group the body content in a table.
It is used to group the header content in a table.
It is used to group the footer content in a table.
8) What are some common lists that are used when designing a page?

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

  • Ordered list - The ordered list displays elements in numbered format. It is represented by
      tag.
    1. Unordered list - The unordered list displays elements in bulleted format. It is represented by
        tag.
      • Definition list - The definition list displays elements in definition form like in dictionary. The
        ,
        and
        tags are used to define description list.
9) What is the difference between HTML elements and tags?

HTML elements communicate to the browser to render text. When the elements are enclosed by brackets <>, they form HTML tags. Most of the time, tags come in a pair and surround content.

10) What is semantic HTML?

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