CBSE Class 10 Computer Applications
Question 15 of 81
Images, Links and Tables — Question 6
Back to all questions 6
Question Question 6
Identify the errors in the following HTML code and write the corrected code with each correction underlined.
<HTML>
<HEAD> IMAGES</TITLE>
<BODY BACKGROUND="Red">
<IMG HREF="abc.jpg">HERE IS MY IMAGE FILE
</HEAD> </HTML>
The given HTML code has the following errors:
- The
<HEAD> ... </HEADtag must be placed above the<BODY>tag. - The
<TITLE>tag is missing its opening tag. - The 'src' attribute of
<IMG>tag should be used to define the image file to be displayed. <BODY>tag is not closed i.e.,</BODY>tag is missing.
The correct HTML code is as follows:
<HTML>
<HEAD>
<TITLE> IMAGES </TITLE>
</HEAD>
<BODY BACKGROUND = "Red">
<IMG SRC = "abc.jpg"> HERE IS MY IMAGE FILE
</BODY>
</HTML>