Display an image “school.jpg” with the text “This is my school” floating to the left of the text.
Answers
Displaying an image - HTML
Before we start displaying and image in HTML, let's first know about HTML that what is HTML.
HTML is a standard hypertext markup language, it is used for creating websítes, HTML describes the structure of web page/websíte, it's consist of a series elements.
The Códe
<!DOCTYPE html>
<html>
<head>
<title>Displaying an image</title>
</head>
<body>
<centre><img src="school.jpg" width="300" height="200"</centre>
<marquee direction = "right">This is my school</marquee>
</body>
</html>
Now, let's know some important tags in HTML, in HTML many tags are there but few important tags are follow as:
- <!Doctype> tag defines the document type.
- <html> tag defines the HTML document.
- <head> tag defines the information for the document.
- <title> tag defines the title of the document.
- <body> tag is defines the body of the document.
- <h1> tag is used for HTML headings.
- <p> tag us used for paragraph.
- <br> tag is used for insert a line break.
- <b> tag is used for bold text.
- <u> tag is used for underline text.
- <i> tag is used for Italic text.
Required Answer:-
<!DOCTYPE html>
<html>
<head>
<title>My School</title>
</head>
<body>
<img src="school.jpg">
<br />
<br />
<marquee direction="right" bgcolor="red" width="100%" height="70">
<h4>This is my school</h4>
</marquee>
</body>
</html>
Points to remember:-
- <marquee> tag is used for floating text
- There are 6 heading tags from <H1> to <h6> respectively
- <br/> tag is used to leave a line