htmlEmphasized
Emphasized text class
[Previous] [Main] [Next]


Description
htmlEmphasized encapsulates the <EM></EM> tags. It is used to mark regions of text for display in emphasized characters, which are usually interpreted as italic on most browsers.  
 
Declaration
#include <dcmicro/htmlpp/styles.h>  
 
Hierarchy
htmlemphasized.gif  
 
See Also
Text Formatting Classes in the User's Guide  
 
Related Constants/Definitions
None.  
 
Constructors
htmlEmphasized()  
Constructs an empty object.  
 
htmlEmphasized( const htmlObject& element )  
Constructs an object, inserting element into it.  
 
htmlEmphasized( const String& text )  
Constructs an object, inserting the string text into it.  
 
Destructor
virtual ~htmlEmphasized()  
Destroys the object.  
 
Example Use
 
#include <stdio.h>  
#include <stdlib.h>  
#include <dcmicro/htmlpp/htmlpp.h>  
 
int main( void )  
{  
   htmlCgi   server ;  
   htmlPage  page( "html++ example application" ) ;  
 
   String         s = "This is an example of " ;  
   htmlBreak      b ;  
   htmlEmphasized emphasized( "emphasized text" ) ;  
   htmlBold       bold( "bold text" ) ;  
   htmlUnderline  underline( "underlined text" ) ;  
   htmlItalic     italic( "italic text" ) ;  
   htmlStrong     strong( "strong text" ) ;  
 
   page << s << emphasized << b  
        << s << bold << b  
        << s << underline << b  
        << s << italic << b  
        << s << strong << b ;  
 
   //  Classes can be nested to combine effects  
   page << s  
        << htmlBold( htmlItalic( "bold italic text" ) )  
        << b ;  
 
   server << page ;  
   return 0 ;  
}  
 
Program Output
 
Content-Type: text/html  
<HTML>  
<HEAD>  
<TITLE>html++ example application</TITLE>  
</HEAD>  
<BODY>This is an example of <EM>emphasized text</EM><BR>  
This is an example of <B>bold text</B><BR>  
This is an example of <U>underlined text</U><BR>  
This is an example of <I>italic text</I><BR>  
This is an example of <STRONG>strong text</STRONG><BR>  
This is an example of <B><I>bold italic text</I></B><BR>  
</BODY>  
</HTML>  
 
 
styles1.gif  




©1998 DC Micro Development. All rights reserved.
No portion of this document may be c opied or reproduced without expressed written consent.
html++ is a trademark of DC Micro Development.