Alt Attribute Example – HTML Syntax – Alt HTML Example

Alt Attribute Example – HTML Syntax – Alt HTML Example

Summary: – Illustrates the for the .
Prerequistes:

  • Install Visual Web Developer 2008 – We are using Visual Web Developer for a development environment so that we can build a website of syntax examples. It also helps by providing intellisense and debugging assistance.

If you do not want to build a library of syntax examples, you can download an excellent free html editor at nvu

Restrictions: None

Notes:

  • You can build your own library of syntax examples by using same web site over and over and just add new files to it.

Instructions:

  1. Use Visual Web Developer 2008
  2. Create new web site;
    • Click File/New Web Site
    • Select ASP.NET Website Template
    • Select C-Sharp for Language
    • name of Web Site could be HTML_Syntax.
  3. Add New folder named “BasicAttributes”
    • Right-click project name in solution explorer;
    • add new folder;
    • name of folder should be: BasicAttributes
  4. Add HTML Page Named Alt to BasicAttributes folder
    • Right-click BasicAttributes folder;
    • add new item;
    • Select HTML Page
    • HTML Page name should be alt
  5. Click on copy code in code below to copy code into HTML Page alt.htm
  6. Right-click on HTML page alt and select view in browser
  7. Purpose: alt=”alt text” – Specifies text to display when image can not be shown.

    View Example In Browser

    <html>
    <head>
    <title>Example For alt</title>
    </head>
    <body>
        <a href="http://www.LearnVisualStudio.NET/119.html" target="_blank"><img alt="Learn Visual Studio"  src="http://www.idealprogrammer.com/wp-photos/LearnVisualStudio.png"/></a>
    </body>
    </html>