Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How To Change Text Fonts for Some Parts of a Paragraph
How To Change Text Fonts for Some Parts of a Paragraph? - XHTML 1.0 Tutorials - Understanding DIV and SPAN elements
✍: FYICenter.com
If you want to change text fonts or colors for some parts of a paragraph, you can use "span" element with "style" attributes to specify font and color information as CSS properties. Here is a tutorial example of using "span" elements to change text fonts:
<?xml version="1.0" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title>Changing Fonts with SPAN Elements</title> </head> <body> <h4>SPAN Elements?</h4> <p><span style="font-family: 'time roman'; font-size: 18pt; font-weight: bold; color: red">I</span> don't <span style="font-size: 16pt; font-weight: bold; font-style: italic; color: red">see</span> any <span style="font-family: courier; font-size: 14pt; font-weight: bold; color: blue">SPAN elements</span> in this paragraph. Do you <span style="font-size: 16pt; font-weight: bold; font-style: italic; color: red">see</span> any <span style="font-family: courier; font-size: 14pt; font-weight: bold; color: blue">SPAN elements</span> here? What is a SPAN element anyway?</p> </body> </html>
If you save the above document as changing_fonts.html and view it with Internet Explorer,
you will see that different parts of the paragraph are having different fonts and colors
as shown below:
2007-05-12, 4962👍, 0💬
Popular Posts:
What is hashing? To hash means to grind up, and that's essentially what hashing is all about. The he...
.NET INTERVIEW QUESTIONS - Is versioning applicable to private assemblies? Versioning concept is onl...
How can you enable automatic paging in DataGrid ? Following are the points to be done in order to en...
Can one change the mouse pointer in Forms? The SET_APPLICATION_PROPERTY build-in in Oracle Forms all...
How many bits are used to represent Unicode, ASCII, UTF-16, and UTF-8 characters? Unicode requires 1...