HTML
  Home arrow HTML arrow Page 4 - HTML Methods to Remember and Use Effective...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
HTML

HTML Methods to Remember and Use Effectively
By: Stephen Davies
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 14
    2007-12-05

    Table of Contents:
  • HTML Methods to Remember and Use Effectively
  • Page Layout
  • Text Enhancing
  • Use of Classes

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    HTML Methods to Remember and Use Effectively - Use of Classes


    (Page 4 of 4 )

    Use of Classes

    To add appearing/disappearing text to our page we need to make use of the span tag again. We will also use the style tag. Now I know this is used with CSS, but in this application, it functions alone. The following code is a little bit longer than what we have been dealing with, mainly because of its repetitious nature.

    <style>

    .time { behavior: url(#default#time2);}

    </style>


    <span>Every second text will appear:</span>

    <span class="time" begin="1">One Thousand</span>

    <span class="time" begin="2">Two Thousand</span>

    <span class="time" begin="3">Three Thousand</span>

    <span class="time" begin="4">Finished!</span>


    This only works because we have the time2 statement in our time class in the style tag. Normally the style tag is placed in the head tag, but in this case, it can be copied as is to the body of our web page.

    The above code will display the selected text, each second, one after the other until it stops at 4 seconds. The span tag allows us to use the style tag's class (i.e. time) without using any other formatting tags. Notice we incremented the number of seconds by one in each begin attribute.

    This is why the text is displayed in succession. With the following line of code replacing the span tags above, we can make the text appear and disappear: <span class="time" begin="1" dur="1">One Thousand</span>. All we did to accomplish this was add the dur attribute (duration), giving it a value of 1 (second).

    Finally, we can make the selected text appear and disappear one after another at the same position on the screen (i.e. on top of each other) by using the following code:

    <:span style="position:absolute;top:10;left:10" class="time" begin="0"
    dur="1">Every second text will appear:</span>
    .

    All we did was add the style attribute, which enables us to specify the position of the selected text. We also started with the first begin attribute as 0. If we replace the selected text with an image, as we did with the marquee, we will get an even better effect.

    There are still many other HTML methods we can use to enhance our web pages, but these will give us a head start.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

       · Why are you using attributes that are not a part of HTML 4.0?
     

    HTML ARTICLES

    - Hello HTML 5, Goodbye Gears
    - Comparing Browser Response to Active Client ...
    - Testing Browser Response to Active Client Pa...
    - Active Client Pages: Completing the Code for...
    - ACP and Browsers: Setting up an Example
    - How Browsers Respond to Active Client Pages
    - Completing a Tree with Active Client Pages
    - HTML Form Verification and ACP
    - Building an ACP Tree
    - Completing an ACP 3D HTML Table Image Gallery
    - Building an ACP 3D HTML Table Image Gallery
    - A Multiple Page Image Gallery with Active Cl...
    - Building an Image Gallery with Active Client...
    - Concluding a Menu for All Browsers
    - A Vertical Menu for All Browsers







    © 2003-2010 by Developer Shed. All rights reserved. DS Cluster 1 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek