📜  HTML<img> longdesc 属性

📅  最后修改于: 2021-10-29 06:20:37             🧑  作者: Mango

在本文中,我们将讨论 HTML 中的longdesc。 Longdesc是一个 HTML 属性,用于提供图像的详细描述。它是一个可选属性,可用于在作为工具提示提供的较短描述之外添加有关图像的额外详细信息。

句法:

属性值:

  • longdesc:该值可以是包含详细描述的指定文档的 URL。

注意: longdesc 属性仅适用于较旧版本的 HTML(即 HTML 4.0 或更旧版本)。使用最新版本 HTML 的浏览器不再支持它。

示例:在此示例中,我们将包含GFG.html,它是一个纯 Html 文件,其中包含有关图像的其他详细信息。

index.html


  

    
    HTML img longdesc Attribute
    

  

    
        

Welcome to GeeksforGeeks

        

Click on the image

                
  


GFG.html


  

    
    

  

    
        

            What We Offer We provide a variety of             services for you to learn, thrive and              also have fun! Free Tutorials, Millions              of Articles, Live, Online and Classroom              Courses ,Frequent Coding Competitions,              Webinars by Industry Experts, Internship              opportunities and Job Opportunities.              With the idea of imparting programming              knowledge, Mr. Sandeep Jain, an IIT              Roorkee alumnus started a dream,              GeeksforGeeks. Whether programming             excites you or you feel stifled,              wondering how to prepare for interview             questions or how to ace data structures              and algorithms, GeeksforGeeks is a              one-stop solution. Our vision is to              build a gigantic network of geeks             and we are only a fraction of it yet.         

    
  


index.html


  

    
    HTML img longdesc Attribute
    

  

    
        

Welcome to GeeksforGeeks

        

Click on the image

                                      
  


GFG.html


  

    
    

  

    

GeeksforGeeks

    
        

            A Computer Science portal for geeks.              It contains well written, well              thought and well explained computer              science and programming articles.             Free Tutorials, Millions of Articles,              Live, Online and Classroom Courses,              Frequent Coding Competitions, Webinars              by Industry Experts. With the idea              of imparting programming knowledge,              Mr. Sandeep Jain, an IIT Roorkee              alumnus started a dream, GeeksforGeeks.             Whether programming excites you or you             feel stifled, wondering how to prepare              for interview questions or how to ace              data structures and algorithms,              GeeksforGeeks is a one-stop solution.              Our vision is to build a gigantic              network of geeks and we are only a              fraction of it yet.         

    
  


GFG.html



  

    
    

  

    
        

            What We Offer We provide a variety of             services for you to learn, thrive and              also have fun! Free Tutorials, Millions              of Articles, Live, Online and Classroom              Courses ,Frequent Coding Competitions,              Webinars by Industry Experts, Internship              opportunities and Job Opportunities.              With the idea of imparting programming              knowledge, Mr. Sandeep Jain, an IIT              Roorkee alumnus started a dream,              GeeksforGeeks. Whether programming             excites you or you feel stifled,              wondering how to prepare for interview             questions or how to ace data structures              and algorithms, GeeksforGeeks is a              one-stop solution. Our vision is to              build a gigantic network of geeks             and we are only a fraction of it yet.         

    
  

输出:

示例:但是,以上示例中使用的功能不再被推荐且不受任何浏览器支持。相反,我们可以将链接( 标签)添加到将显示图像描述的图像。为此,我们将GFG.html文件包含到我们的index.html文件中。

GFG.html



  

    
    

  

    

GeeksforGeeks

    
        

            A Computer Science portal for geeks.              It contains well written, well              thought and well explained computer              science and programming articles.             Free Tutorials, Millions of Articles,              Live, Online and Classroom Courses,              Frequent Coding Competitions, Webinars              by Industry Experts. With the idea              of imparting programming knowledge,              Mr. Sandeep Jain, an IIT Roorkee              alumnus started a dream, GeeksforGeeks.             Whether programming excites you or you             feel stifled, wondering how to prepare              for interview questions or how to ace              data structures and algorithms,              GeeksforGeeks is a one-stop solution.              Our vision is to build a gigantic              network of geeks and we are only a              fraction of it yet.         

    
  

输出:

支持的浏览器:现在任何浏览器都不支持此属性。