Alt Attribute Example – HTML Syntax – Alt HTML Example
Alt Attribute Example – HTML Syntax – Alt HTML Example
Summary: – Illustrates the HTML syntax for the alt attribute.
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:
- Use Visual Web Developer 2008
- 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.
- Add New folder named “BasicAttributes”
- Right-click project name in solution explorer;
- add new folder;
- name of folder should be: BasicAttributes
- Add HTML Page Named Alt to BasicAttributes folder
- Right-click BasicAttributes folder;
- add new item;
- Select HTML Page
- HTML Page name should be alt
- Click on copy code in code below to copy code into HTML Page alt.htm
- Right-click on HTML page alt and select view in browser
Purpose: alt=”alt text” – Specifies text to display when image can not be shown.
<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> |
