Computer Applications
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>
HTML Advanced Features
19 Likes
Answer
The given HTML code has the following errors:
- The
<HEAD> ... </HEAD
tag 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>
Answered By
8 Likes
Related Questions
Shivam has been given an assignment by her class teacher to design a table in such a way that the amount of space between its cell borders and cell data is 5 pixels and distance between any two cells is 3 pixels. Which attributes can she use to accomplish the task?
Ayush has to display the sequence of events of the upcoming Annual Sports Day on the school website. Help Ayush in writing the HTML code to generate the following output.
Consider the web page given below and answer the following questions:
- Mention the tags used to create a table pointed by the letter A.
- Which property of
<IMG>
tag is used to wrap the text around the image? - Name the tag and its attributes to set the alignment of text pointed by the letters B and D.
- Name the tag used to create the links pointed by the letter C.
Gaurav, a web designer in a company named "International Designers" has just created a webpage in which different sections of the webpage are linked and can be traversed by clicking on the text given as "Top", "Middle", and "Bottom". Is it internal linking or external linking and why? Additionally, tell him about the suitable tag and its attribute(s) to open another webpage named 'second.html' by clicking on the text "Next".