Syntax for adding image in HTML5

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


Syntax for adding image in HTML5


<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
<head>

<style>
body {
background-color: lightblue;
}

h1 {
color: black;
font-size: 70px;
text-align: center;
}

h2{
color: red;
font-family: verdana;
font-size: 29px;
text-align: center;
}
</style>

</head>
<body>

<h1>HOTEL MANAGEMENT</h1>
<h2> Welcome To Hotel MYNE.</h2>
<img src="C:UsersBIPIN KUMARDesktophotel-management-system-dryice.jpg" alt="Hotel Management System">
</body>
</html>



Can any body help me in finding the error in this code.When I run the code it is not showing the image ,I have changed the image also then also it not showing the image.Can anybody help me in solving this problem?




1 Answer
1



I'm not 100% sure, but you may not be able to have spaces within your file path.



You can either rename BIPIN KUMAR to "BIPIN_KUMAR" or something else with a character in place of the space, or you can leave the name as it is and encode it within your file path.



So instead of:


<img src="C:UsersBIPIN KUMARDesktophotel-management-system-dryice.jpg"



Do:


<img src="C:UsersBIPIN%20KUMARDesktophotel-management-system-dryice.jpg"



Let me know if it works! I found this by looking at this post






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Arduino Mega cannot recieve any sketches, stk500_recv() programmer is not responding

Visual Studio Code: How to configure includePath for better IntelliSense results

C++ virtual function: Base class function is called instead of derived