#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    8
    Rep Power
    0

    Making text Flash?


    Hi HTML Experts,

    We embedded a HTML tags in XML file to make a text
    BOLD and COLORFULL.
    as below
    ""<b><font color=\'#00FFFF\'>Hello World</font></b>"

    We can make text Blink by embedding <Blink> tag in XML similarly as above tags.
    But IE browser didn't support Blink tag

    Is there any other way to make text flash in XML file by embedding HTML tags..?
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Location
    Atlanta, GA
    Posts
    14
    Rep Power
    0
    It appears that support for <blink> is dropping across the board, it's not just IE. This makes sense too, browsers are moving more towards CSS for styling, and reserving HTML for semantics and structure.

    If you want to have a blinking effect, you should use CSS (perhaps @keyframe), or some very basic JavaScript.
  4. #3
  5. For POny!
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2012
    Location
    Amsterdam
    Posts
    416
    Rep Power
    115
    Small tip, don't use the font tag, and if you want to emphasize something use <strong> instead of <b>

    Further more You could use javascript to trigger epileptic attacks (in other words let your text blink, cross browser)
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Location
    Atlanta, GA
    Posts
    14
    Rep Power
    0
    If you wanted to go the JavaScript route, you could create a closure, grab any element with the class .blink, and then set an interval to toggle its opacity between 0 and 1 every 1000 ms.

    Here's how I'd do it:

    javascript Code:
    (function(){
        // Gets all .blink elements, sets initial opacity, and counter variable
        var elems = document.querySelectorAll(".blink"), opacity = 1, i = 0;
     
        // Run our function every second
        setInterval(function(){
            // Set new target opacity
            opacity = opacity ? 0 : 1 ;
            // Cycle over all of our .blink elements
            for (i = 0; i < elems.length; i++) {
                // Update element opacity to new opacity
                elems[i].style.opacity = opacity;
            }
        // Do it all again in 1 second
        }, 1000); 
    }());&#8203;&#8203;&#8203;


    Which works against HTML like this:

    html Code:
    <p>This is a sentence with a <span class="blink">blinking</span> word. Let's add another <span class="blink fancy">set of <strong>words</strong> that <em>blink</em></span> to our paragraph.</p>


    You can see this in effect online at jsfiddle.net/UsZYV/
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    8
    Rep Power
    0

    Hi


    Hi jonathansampson,

    Thank you for helping me on this.
    The code you provided looks good.

    If it possible can you give me ur mail id I hav some questions on this.
    I am expecting some guidance from you.

    Its my mail id: kotapati.ajay@gmail.com

    Just email me......thanks

    regards,
    Ajay
  10. #6
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Location
    Atlanta, GA
    Posts
    14
    Rep Power
    0
    Feel free to ask questions here regarding the script.

IMN logo majestic logo threadwatch logo seochat tools logo