HTML Interview Questions Part 6

31. What are logical and physical tags in HTML?

Answer:

Logical tags describes enclosed text's meaning to the browser. For example, <strong>...</strong> tag. When we enclosed text in strong tag, it tells the browser that enclosed text is more important than other text.

Physical tags describes the browser how to display the text enclosed in the physical tag. For example, <b>, <big>, <i>.

32. How to add midi music to a web page?

Answer:

To add midi Music in HTML web page following tag is used:

<bgsound src="music.mid" loop="1">

Parameters,
'loop = 1' : This parameter shows that music.mid is played only for one time. You can also set the value of loop to infinite. This tag is supported by Netscape and Internet Explorer.

Example:
<embed src="canyon.mid" Autostart=TRUE Width=145 Height=60 Loop=true>

33. What are the list tags in HTML?

Answer:

There are two ways to specify list tags in HTML:

1. Unordered List
2. Ordered List

1. Unordered List

This list starts with the <ul> tag and each item list starts with the <li> tag.

In unordered list, the list-style-type property is used to define the style of the list item marker.

For example,
disc: It sets the list item marker to a bullet (default).
circle: It sets the list item marker to a circle.
square: It sets the list item marker to a square.
none: The list items will not be marked.

Syntax:
<ul>
    <li>First item</li>
    <li>Second item </li>
</ul>


Display as:
  • First item
  • Second item
2. Ordered List

An ordered list starts with the <ol> tag and each list item starts with the <li> tag.

In ordered list, the 'type' attribute defines the type of the list item marker.

For example,
type="1": The list items will be numbered with numbers (default).
type="A": The list items will be numbered with uppercase letters.
type="a": The list items will be numbered with lowercase letters.
type="I": The list items will be numbered with uppercase roman numbers.
type="i": The list items will be numbered with lowercase roman numbers.

Syntax:
<ol>
    <li> first item </li>
    <li>second item </li>
</ol>


Display as:
1. First item
2. Second item

34. What is difference between HTML and HTML5?

Answer:

Document of HTML is very large as compare to the HTML5.

Audio and Video tags are not present in HTML whereas HTML5 contains audio and video tags.

Vector technology is not integral part of HTML whereas HTML5 Vector technology is the integral part of it.

HTML supported by all old browsers whereas HTML5 is supported by new browser.

In HTML, web sockets are not available whereas in HTML5 Full duplex communication channel is present.

36. What is the use of CSS in HTML?

Answer:

CSS plays an important role in building the website.

CSS describes how HTML elements are to be displayed on screen, paper, or in other media.

By using CSS with HTML we can change the look of the web page by changing the font size and color of the font.

Well written CSS file can be used to change the presentation of each web page.

By including only one CSS file, it gives web developer and user more control over the web pages.