Empty Attributes & "Reformat HTML" Command

K

Kris

Hi All,

I've been using the "Reformat HTML" command in FrontPage 2002 to cleanup my
web pages but I just noticed that it is removing the quotations from blank
attributes.

For example:

<img src="my_image.gif" width="35" height="9" alt="test image" title="">

gets reformatted to

<img src="my_image.gif" width="35" height="9" alt="test image" title>

I am creating HTML 4.01 strict pages and this behaviour is causing my pages
to fail validation. Is this a bug in FrontPage or is there some way to turn
off or alter this behaviour?


Thank-You,
Kris
 
J

Jens Peter Karlsen [FP MVP]

I can't reproduce this in FP2003. It correctly changes it to:
<img src="my_image.gif" width="35" height="9" alt="test image"
title="" />

But why have an empty title attribute in there? It will cause Opera
and Mozilla to open an empty tooltip when the cursor is over the
image.

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.
 
S

Stefan B Rusynko

Try changing it to title=" "

--




| Hi All,
|
| I've been using the "Reformat HTML" command in FrontPage 2002 to cleanup my
| web pages but I just noticed that it is removing the quotations from blank
| attributes.
|
| For example:
|
| <img src="my_image.gif" width="35" height="9" alt="test image" title="">
|
| gets reformatted to
|
| <img src="my_image.gif" width="35" height="9" alt="test image" title>
|
| I am creating HTML 4.01 strict pages and this behaviour is causing my pages
| to fail validation. Is this a bug in FrontPage or is there some way to turn
| off or alter this behaviour?
|
|
| Thank-You,
| Kris
|
|
 
K

Kris

Thank-you for the response Jens.

Are you using the "Apply XML Formatting Rules" command or the "Reformat
HTML" command? The way I am doing it is by switching to the source view,
right clicking over the page and selecting "Reformat HTML" from the menu.

I am looking for a way to insert an image into a web page and not have it
display a tool tip when the user hovers over it. If I use the following
code:

<img src="my_image.gif" width="35" height="9" alt="test image">

IE displays a tooltip saying "test image" when I hover the mouse pointer
over it. What I would like is to have no tool tip displayed at all. The only
way that I found to do that is to use the following code:

<img src="my_image.gif" width="35" height="9" alt="test image" title="">

From what I've read, using the ALT attribute for tooltip text is a bug in
IE, as only the TITLE attribute is supposed to be used for tooltip text.

Any suggestions you may have would be greatly appreciated.
 
K

Kris

Thank-you for the response Stefan. I tried that but, unfortunately, it
causes IE to display an tooltip with a blank space in it. What I'm aiming
for is being able to use the ALT attribute (both to comply with HTML 4.01
strict specification and to be friendly to browsers that don't have graphics
capability) but having *no* tooltip when the mouse pointer is placed over
the picture. I'm using IE 6 for my testing if it makes any difference. Any
suggestions that you may have would be greatly appreciated.
 
T

Thomas A. Rowe

If you want to block the IE Image Toolbar, add the following to the head
section of your page:

<meta HTTP-EQUIV="imagetoolbar" CONTENT="no">

--

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, Forums, WebCircle,
MS KB Quick Links, etc.
==============================================
 
J

Jens Peter Karlsen [FP MVP]

There is no way to do what you want that will work in all Browsers.
The closest you can come is what you described.

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.
 
K

Kris

Thank-you Thomas ... but I think that the imagetoolbar meta tag only applies
to the image toolbar and not tooltip text, right? Based on Jens' answer in
it appears as if the only
solution is to include an empty title attribute as follows:

<img src="my_image.gif" width="35" height="9" alt="alt_text" title="">
 
K

Kris

Thank-you Jens.

Jens Peter Karlsen said:
There is no way to do what you want that will work in all Browsers.
The closest you can come is what you described.

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.
 
T

Thomas A. Rowe

Kris,

Sorry, I actually mis-read your post.

--

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, Forums, WebCircle,
MS KB Quick Links, etc.
==============================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top