alt

How can I only get the alt attribute of the a p tag in PHP?

蹲街弑〆低调 提交于 2019-12-01 19:56:38
I'm working on a script that echo's only the price. If I do: $alttag = $oNode['p']; echo $alttag; It will echo everything in <p></p> . So it will echo: roodmerk of cafeïnevrij pak 500 gram 2 pakken prijs per kilo 1,99 199 from the website, so you can see it echo´s 199, that´s the price but first I ONLY need 199 in the <p></p> and I want . or , between 199 so it will show 1,99 or 1.99. If I do: $alttag = $oNode['p sup']; echo $alttag; It will only echo 99 out of <sup></sup> If I do: $alttag = $oNode['p sup']; $maintag = $oNode['p']->attr('alt'); echo $maintag . $alttag; Well... This does

image_tag - Is there a way to make the alt attr blank by default?

血红的双手。 提交于 2019-12-01 09:14:29
I rather have a blank alt attribute if an image is missing instead of the filename of the image (who ever wants this default behavior anyway?) Is there a way to make a system configuration so image_tag sets a blank alt attr if no alt was given? Just to be clear: I am not interested in image_tag('path/to/image', :alt => '') I am interested in setting it once for all the image_tags. For Rails 3.2 add this under config/initializers module ActionView::Helpers::AssetTagHelper def image_alt(src) return '' end end You can monkey-patch ActionView::Helper#image_alt with: def image_alt(src) '' end Or

how to perform a hold ALT+TAB sendkey event in C#

↘锁芯ラ 提交于 2019-12-01 05:08:56
问题 I am trying to use a sendkey event that holds the ALT key and then presses the TAB key. How do you perform that action, I've tried many variations but I can't seem to find the answer, thanks. 回答1: Using sendkeys PInvoke it's possible to do this by sending ALT keydown event, TAB keydown, then TAB keyup, then ALT keyup. There is also another way using the ALT modifier on the key but I cannot remember exactly how as I haven't worked with it in a while. If you want to do multiple tabs alternate

Alt? Longdesc? Title? What goes where, especially for image-heavy sites?

烈酒焚心 提交于 2019-11-30 14:55:32
问题 So I've been trying to make my site as accessible as possible (for non-JavaScript users, web crawlers, screen readers, etc), and I hit a large snag. The site I'm developing is very image heavy. (I draw stupid stuff in my spare time and the site is a sort of a "showcase".) Each page in the site has a single image (or multiple, if context is needed or the image is several panels) that is usually accompanied by a single caption underneath. So when I got to the point where I had to add

Alt? Longdesc? Title? What goes where, especially for image-heavy sites?

元气小坏坏 提交于 2019-11-30 13:06:45
So I've been trying to make my site as accessible as possible (for non-JavaScript users, web crawlers, screen readers, etc), and I hit a large snag. The site I'm developing is very image heavy. (I draw stupid stuff in my spare time and the site is a sort of a "showcase".) Each page in the site has a single image (or multiple, if context is needed or the image is several panels) that is usually accompanied by a single caption underneath. So when I got to the point where I had to add accessibility options, I wasn't sure what to do. For example, let's say I had an image of a man eating an apple

HTML img tag: title attribute vs. alt attribute?

感情迁移 提交于 2019-11-28 15:41:23
I was browsing Amazon and I noticed that when searching " 1TB " if you hover the mouse cursor over the stars rating image, you only see the score if using IE. If you are using another browser then the score won't show. A rating of 3.8 and a rating of 4.2 both show up as 4 stars. Of course a 3.8 stars vs 4.2 stars (76% vs 84% score) could make a difference! This is because the standard way of displaying alt text is only when the user turns off graphics or when the browser is "read out" (e.g browser for users who are visually impaired). IE however, shows it on hover. So I think if Amazon is to

Image title attribute or link title attribute or both?

人走茶凉 提交于 2019-11-28 01:38:45
Let's say I have a list of images on the page, that are wrapped within links. So when u click an image it gets you to a page that displays the larger image How should I handle title tags here? Do I put the image title on both the image and the link, or just the image? Does it matter if the title is the same as the "alt" attribute? <a title="image description" href="#"><img title="image description" alt="image description" src="image.jpg"></a> The image title attribute should describe the image. The link title attribute should describe the target of the link. <a title="view larger version" href

About the Title/Alt attributes;

岁酱吖の 提交于 2019-11-27 23:10:16
I hope I can post this. I understand the the purpose of the title and alt attributes, but I just do not understand the best use for them or if I can use the same title/alt more than once. For Example a website about dogs: From my understanding all img tags need an alt tag: <img src="Husky.png" alt="Husky" /> <img src="Rottweiler.png" alt="Rottweiler" /> Is it good practice to use the same alt tag for multiple pictures on the same subject <img src="Husky2.png" alt="Husky" /> <img src="Husky3.png" alt="Husky" /> <img src="Husky4.png" alt="Husky" /> Is it good practice to use a title/alt tag in

How can I display an image if browser does not support HTML5's <video> tag

你说的曾经没有我的故事 提交于 2019-11-27 14:28:16
Does anyone know how can I display an image for the browsers which don't support the tag ? Displaying a text such as in: <video src="video.mp4" type="video/mp4"> Your browser does not support the <video> tag </video> Is easy, but if I replace the text with an img tag, it will always show the image, even when the browser DOES support the video tag. Thanks for sharing your knowledge (EDIT) This is not the case, my tests were wrong and img tag indeed gets rendered only when video is not supported (e.g. Safari 5) I was just checking this link , as well as HTML5's spec , so this code should work

HTML img tag: title attribute vs. alt attribute?

允我心安 提交于 2019-11-27 09:31:27
问题 I was browsing Amazon and I noticed that when searching "1TB" if you hover the mouse cursor over the stars rating image, you only see the score if using IE. If you are using another browser then the score won't show. A rating of 3.8 and a rating of 4.2 both show up as 4 stars. Of course a 3.8 stars vs 4.2 stars (76% vs 84% score) could make a difference! This is because the standard way of displaying alt text is only when the user turns off graphics or when the browser is "read out" (e.g