top of page

Code to find the source of an image

<html>
  <head>
    <title>Img Src Attribute Example</title>
  </head>
  <body>
    <img src="https://avatars0.githubusercontent.com/u/9892522?v=4&s=400" />
  </body>
</html>

​

​

OUTPUT:

Code to embed a video in a webpage

<video controls>
  <source src="tutorial.ogg" type="video /ogg" />
  <source src="tutorial.mp4" type="video /mpeg" />
  Your browser does not support the video element. Kindly,update it to latest version.
</video>

Code to add an audio file

<html>
  <head>
    <title>Img Src Attribute Example</title>
  </head>
  <body>
    <img src="https://avatars0.githubusercontent.com/u/9892522?v=4&s=400" />
  </body>
</html>

Code to add validation to a form

<form>            
<label>Name: <input type="text" placeholder="Enter Name" required><label>
</form>    

Code to add checkbox validation

<form>            
<label>Terms <input type="checkbox" required></label>    
</form> 

Code to add radio buttons

<form>            
<label><input type="radio" name="gender" required> Male</label>      
<label><input type="radio" name="gender" required> Female</label> 
</form> 

Code to add a dropdown selection

<form>            
<select aria-label="City" required>
<option value="" selected disabled>--Choose City--</option>
<option>New Delhi</option>
<option>Chennai</option>
<option>Mumbai</option>
<option>Kolkata</option>
</select>
</form>    

Code to add a dropdown selection


<form>            
<select aria-label="City" required>
<option value="" selected disabled>--Choose City--</option>
<option>New Delhi</option>
<option>Chennai</option>
<option>Mumbai</option>
<option>Kolkata</option>
</select>
</form>    
            

bottom of page