Web Design Stuff
HTML Tutorials    CSS Tutorials    Web Hosting   Resources
Create a Web Page 101
Making Web Pages Intro What is a Web Page? Why Make a Web Page? The History of HTML Learn HTML or XHTML?
Basic HTML
Basic HTML Tutorials Basic HTML Necessities How to Make a Web Page How to Edit a Web Page The Basics of HTML Tags Basic HTML Page Structure HTML Attributes
HTML Font Codes
HTML Font Codes Intro HTML Font Color Codes HTML Font Size Codes HTML Font Style Codes HTML Bold/Italic Codes Combining Font Codes
Formatting Text
Formatting Text Intro Making Paragraphs Miscellaneous Formatting Headings & Subheadings Creating Hyperlinks
Using Graphics
Using Graphics on the Web Add Graphics to Your Pages Graphics and Accessibility How to Align Graphics Page Color & Background Graphics as Hyperlinks Horizontal Rules
Creating Tables
HTML Tables Tutorials HTML Table Fundamentals Background & Border Color Table Frames & Rules Table Width and Alignment Cells 1 -Space & Alignment Cells 2 -Row Column Span Cells 3 -Width & Height
Making Lists
HTML Lists Tutorials Bulleted Lists Numbered Lists Definition Lists
HTML Frames
HTML Frames Tutorials Using Frames for Layout Advanced Frame Layouts Putting Hyperlinks in Frames Frame Border Width Color, Margin and Control Problems with Frames SmartFrames: A Solution SSI: An Alternative to Frames
Web Page Forms
Making Feedback Forms A Simple Feedback Form Installing NMS FormMail Debugging Your Setup My Web Host is Out to Lunch User Input Components Text Fields Checkboxes & Radio Buttons Dropdown Menus Push Buttons Layout and Presentation
Basic CSS
Basic CSS Tutorials What is CSS? Why You Should Use CSS How to Use CSS Inline Styles Embedded Style Sheets External Style Sheets Class Selectors ID Selectors Combining Selectors
CSS Properties
CSS Properties Intro Font Styles Width, Height & Spacing Borders Backgrounds Position Float & Alignment Hyperlinks
All About Web Hosting
Hosting Your Own Website What is a Web Host? Your Website's Home Page Building a Website Offline About Free Web Hosting Best Free Web Hosting Commercial Web Hosting How to Get a Domain Name Ecommerce Web Hosting Web Hosting Terminology
Free Web Design Tools
Best Free Website Tools Best Free Text Editors Best Free Graphics Editors Free Website Analysis Tools
Setting Up HTML Kit
HTML Kit Introduction How to install HTML Kit Screenshot Breakdown Basic Configuration Overall Appearance Shortcuts and Startup Editing Window Customizing Toolbars Using the Favorites Tab Making a New Actions Bar Odds and Ends
Free Templates
Free Website Templates Two Column Fixed Width Three Column Liquid Layout Miscellaneous Templates Dynamic Menu Effects Two Column Experimental Terms of Use About These Templates
Website Templates Help
Getting Started Template Zip File Download How to Edit Your Template What to Edit in the HTML How to Add Your Logo Making a Website
Web Design Tips
Web Design Basics Tables vs. Tableless Using Tables for Layout Example Table Layouts World's Crappiest Web Page
Twitter Backgrounds
Twitter Backgrounds Intro Cool Twitter Backgrounds Cool Twitter Backgrounds 2 Plain Twitter Backgrounds Dark Twitter Backgrounds Best Twitter Backgrounds Cute Twitter Backgrounds Music Twitter Backgrounds Music Twitter Backgrounds 2 Twitter Backgrounds 101 TERMS OF USE
All About Web Browsers
What is a Web Browser? Mozilla Firefox Internet Explorer Opera How to Set Up Firefox Top 5 Firefox Extensions
 
Contact
Post Some Feedback Send Me An Email Iron Spider Blog About Iron Spider... Site Conventions
 
 
 

 

Graphics 2 - Accessibility

 
<img src="mycoolpic.gif"
alt="description"
width="pixels"
height="pixels">
 
 
Sets alternate text for missing graphics
Sets the width of your graphic
Sets the height of your graphic
 
Theoretically, all you need to display a graphic on your web page is the img element with the src attribute along with an appropriate value. However if you really want to optimize how web browsers display your graphics, you should also take care to use other attributes as well, most particularly alt, width and height. These are detailed below:
  • alt - For various reasons, some people may not be able to see your web page graphics. This may be due to disability or could also be the result of browser options set to not display graphics. Some people who have slow internet connection speeds will turn off the display of graphics in their browsers to speed up the loading of web pages. If you are currently using Internet Explorer, you can turn this option on or off by clicking on Tools » Internet Options » Advanced and then in the list of Settings scroll down to locate 'Show Pictures'. Clicking to check or clicking to clear this box will respectively turn on or off the display of graphics in your browser.

    Using the alt attribute, you can insert text to give visitors a brief description that will replace any missing graphics. (Internet Explorer users that can view graphics may hover their mouse pointer over them to see the alt text as a tool tip.) For example, the following code will display mycoolpic.gif with the alt text set to 'My Cool Picture':

    Example 1 - mycoolpic.gif

    <img src="mycoolpic.gif" alt="My Cool Picture">



    In browsers displaying graphics, the code in Example 1 will render the following (hover your mouse pointer over it):

    My Cool Picture


    And in browsers not displaying graphics, the code in Example 1 will render the following:

    My Cool Picture


    Always using the alt attribute and filling in the value with appropriate text is considered good manners on the internet.

  • width, height - By taking care to specify the dimensions of all your graphics, browsers will preassign this space as they load pages. This keeps the entire page from resizing every time a browser finally figures out how big each graphic is (by initiating its download) and hence makes for faster and smoother page loading. To specify the dimensions of your graphics, use the width and height attributes in the img tag. Using mycoolpic.gif as an example:


    <img src="mycoolpic.gif" alt="My Cool Picture"
        width="150" height="100">



    The values for width and height are specified as lengths in pixels. Almost all graphic editors will provide you with this information. If you don't have a graphics editor because, for example, you are using free clip-art that you've downloaded off the internet, you can still get the dimensions of your graphic by inserting just the basic source code to render an image. Save your work and then open up your web page in a browser (Internet Explorer, Netscape, Mozilla or Opera), right-click on your graphic and then click on Properties (if you're using Opera, click on Image Properties). The pop-up dialog will then furnish you with the dimensions in pixels of your graphic.

By now some of you who have experimented a little with inserting graphics on your web pages have noticed the graphic always aligns flush with the left margin and any text that follows will always begin at the bottom of the graphic (if horizontal page space permits). Hence you'll probably be interested in how to align graphics to the center or to the right and how to make text flow around them...





Best Free Stuff
for webmasters

Free Text Editors
Free Graphics Editors
Website Analysis Tools
Free Website Templates

See also:

Best Free Web Hosting

 

If you need a .COM web address, you can get one quick and easy at...

www.GoDaddy.com
<~BACK TOP NEXT ~>
 
HTML Tutorials |  CSS Tutorials |  Web Hosting |  Domain Names |  Web Design Resources
Iron Spider © Copyright 2004-2011 Robert Darrell