Identify the errors in HTML code.

Q11. Identify the errors in the following HTML code. Also write the correct code.

<OL> type =”a” start=”d”>

Ans. The errors are;

  1. OL must not be followed by ’>’ i.e., ‘>’ must follows type and start attributes.
  2. The start attribute should be assigned a numeric value. The code is:

<OL type=”a” start =4>.

Comment in HTML.

Q9. When can a comment be placed in a HTML document? How is it useful?

OR

How do you give a comment in HTML?

OR

Where can a comment be placed in an HTML document? How is it useful?

Ans. Comments are special type of textual information which appears in the HTML code, but not is a part of the layout of the Web page.

<HTML>

<HEAD> Read More …

Distinguish between BASEFONT SIZE and FONT SIZE tag.

Q3. Distinguish between the <BASEFONT SIZE> and the <FONT SIZE> tag with the help of an example for each?

Ans. The <BASEFONT SIZE> tag is used to change the default font size in a Web page, whereas, the <FONT SIZE> tag is used to change the font size of the text which is enclosed in this tag.

Example for <BASEFONT SIZE>:

<HTML>

<HEAD>

<BASEFONT COLOR=”red” FACE=”Algerian” SIZE=”6”>

<TITLE> WELCOME TO HTML</TITLE>

</HEAD>

<BODY>

This is an example of BASEFONT tag

</BASEFONT>

</BODY> Read More …

Identify the error HTML code.

Q2. Identify the error(s) in the following HTML code. Also write the correct code.

<BODY Color=”Red” background=”School.jpg”>

Ans. The errors in the given code are:

  1. Color is not an attribute of <BODY> tag and the color attribute is written as bgcolor.
  2. Bgcolor and background attributes should not be written together. Because the background attribute overrides the effect of bgcolor attribute.

Read More …