Home / Interview / HTML :: General Questions

Interview :: HTML

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

Three tags are used to separate the texts.


  • tag - Usually
    tag is used to separate the line of text. It breaks the current line and conveys the flow to the next line
  • tag - The

    tag contains the text in the form of a new paragraph.

  • tag - It is used to define a large quoted section. If you have a large quotation, then put the entire text within
    .............
    tag.
22) How to make a picture of a background image of a web page?

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

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

23) What are empty elements?

HTML elements with no content are called empty elements. For example:
,


etc.

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

The span tag is used for following things:

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

Example:

25) What is the use of an iframe tag?

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

Syntax:

Example:

Target to a link:

26) What are the entities in HTML?

The HTML character entities are used as a replacement for reserved characters in HTML. You can also replace characters that are not present on your keyboard by entities. These characters are replaced because some characters are reserved in HTML.

27) Why is a URL encoded in HTML?

An URL is encoded to convert non-ASCII characters into a format that can be used over the Internet because a URL is sent over the Internet by using the ASCII character-set only. If a URL contains characters outside the ASCII set, the URL has to be converted. The non-ASCII characters are replaced with a "%" followed by hexadecimal digits.

28) Does a <!DOCTYPE html> tag is a HTML tag?

No, the declaration is not an HTML tag. There are many type of HTML e.g. HTML 4.01 Strict, HTML 4.01 Transitional, HTML 4.01 Frameset, XHTML 1.0 Strict, XHTML 1.0 Transitional, XHTML 1.0 Frameset, XHTML 1.1 etc. So, is used to instruct the web browser about the HTML page.

29) What is the canvas element in HTML5?

The element is a container that is used to draw graphics on the web page using scripting language like JavaScript. It allows for dynamic and scriptable rendering of 2D shapes and bitmap images. There are several methods in canvas to draw paths, boxes, circles, text and add images. For Example:

30) What is SVG?

HTML SVG is used to describe the two-dimensional vector and vector/raster graphics. SVG images and their behaviors are defined in XML text files. So as XML files, you can create and edit an SVG image with the text editor. It is mostly used for vector type diagrams like pie charts, 2-Dimensional graphs in an X, Y coordinate system.