Safcode Institute by Sir Safder





  • Image Tag in HTML

    Images
    Images are a staple of any web designer, so it is very important 
    that you understand how to use them properly. 
    
    Use the <img /> tag to place an image on your web page.
    
    The <img> tag is empty, which means that it contains attributes only, 
    and has no closing tag. 
    
    To display an image on a page, you need to use the src attribute. 
    Src stands for "source".
    
    The value of the src attribute is the URL of the image you want to display. 
    Example:
    
    <img src="1.jpg" />
    
    Output:
    
    
    The required alt attribute specifies an alternate text for an image, 
    if the image cannot be displayed.
    
    The value of the alt attribute is an author-defined text:
    
    <img src="boat.jpg" alt="safcode" />
    
    You can also use width and height attribute in img tag:
    
    <img src="1.jpg" width="600" height="380"/>
    
    
    



  • You Can Also Watch Our Tutorial