The Forum has been Updated
The code has been upgraded to the latest .NET core version. Please check instructions in the Community Announcements about migrating your account.
As one could read on several HTML guidelines, the use of an ALT attribute with an image is a 'nice' thing to do:
I'm just wondering whether or not it would be possible to implement this feature (or something similar) into the forumcode.
The normal HTML code for such an image would be this:
<IMG SRC="image.gif" ALT="the image alt" TITLE="the image alt"> Note that I added the TITLE ánd the ALT attribute; even though the ALT attribute works for most browsers. However, some browsers will not display anything if there is no TITLE attribute.
Now, with the current forum code, we can only specify the source image. I was thinking of doing it a bit like this:
the image alt"][img]image.gif[/img][/title;"> In this way it could also be used for links, ánd normal text, so one would see a sort of 'mouse over' effect when hovering over the text or hyperlink :
the hyperlink title"][url]hyperlink[/url][/title;"> or
the alt text"]normal text[/title;">
I think that duplicating the code used for the translation of [url="hyperlink"][/url] could be used for this, but I'm not sure on how to do this. The title won't need any markup, but it would include the use of blank spaces.
However, if we would really need to create the equivalent of the real ALT and TITLE attributes of the IMG tag, it would be a lot more difficult. Perhaps the forumcode equivalent would then need to be something like this:
[img="image.gif",title="title",alt="alt"] But, that would mean a complete redo of the img tag...
Any suggestion is welcome.
(BTW ; another thing I was thinking about, was to add a bookmark code to the forumcode ; e.g. making code available to insert a referencable bookmark. (<a href="#Test"></a>).)<
In HTML authoring, there are very good reasons to include an alt attribute into every img element. The purpose is to specify a textual replacement for the image, to be displayed or otherwise used in place of the image.(Source)
Thus, the prime rule is: Consider what the page looks like or sounds like when images are not shown. Then, write for each image an alt text that best works as a replacement.
I'm just wondering whether or not it would be possible to implement this feature (or something similar) into the forumcode.
The normal HTML code for such an image would be this:
<IMG SRC="image.gif" ALT="the image alt" TITLE="the image alt"> Note that I added the TITLE ánd the ALT attribute; even though the ALT attribute works for most browsers. However, some browsers will not display anything if there is no TITLE attribute.
Now, with the current forum code, we can only specify the source image. I was thinking of doing it a bit like this:
the image alt"][img]image.gif[/img][/title;"> In this way it could also be used for links, ánd normal text, so one would see a sort of 'mouse over' effect when hovering over the text or hyperlink :
the hyperlink title"][url]hyperlink[/url][/title;"> or
the alt text"]normal text[/title;">
I think that duplicating the code used for the translation of [url="hyperlink"][/url] could be used for this, but I'm not sure on how to do this. The title won't need any markup, but it would include the use of blank spaces.
However, if we would really need to create the equivalent of the real ALT and TITLE attributes of the IMG tag, it would be a lot more difficult. Perhaps the forumcode equivalent would then need to be something like this:
[img="image.gif",title="title",alt="alt"] But, that would mean a complete redo of the img tag...
Any suggestion is welcome.
(BTW ; another thing I was thinking about, was to add a bookmark code to the forumcode ; e.g. making code available to insert a referencable bookmark. (<a href="#Test"></a>).)<