Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

7/21/2014 CSS3 Text Effects

http://www.w3schools.com/css/css3_text_effects.asp 1/2
REFERENCES | EXAMPLES | FORUM
CSS Tutorial
CSS HOME
CSS Introduction
CSS Syntax
CSS Selectors
CSS How To
CSS Backgrounds
CSS Text
CSS Fonts
CSS Links
CSS Lists
CSS Tables
CSS Box Model
CSS Border
CSS Outline
CSS Margin
CSS Padding
CSS Dimension
CSS Display
CSS Positioning
CSS Floating
CSS Align
CSS Combinators
CSS Pseudo-class
CSS Pseudo-element
CSS Navigation Bar
CSS Image Gallery
CSS Image Opacity
CSS Image Sprites
CSS Media Types
CSS Attr Selectors
CSS3 Tutorial
CSS3 Introduction
CSS3 Borders
CSS3 Backgrounds
CSS3 Gradients
CSS3 Text Effects
CSS3 Fonts
CSS3 2D Transforms
CSS3 3D Transforms
CSS3 Transitions
CSS3 Animations
CSS3 Multiple Columns
CSS3 User Interface
CSS Summary
CSS Examples
CSS Examples
CSS Quiz
CSS Certificate
CSS References
CSS Reference
CSS Selectors
CSS Reference Aural
CSS Web Safe Fonts
CSS Units
CSS Colors
CSS Color Values
CSS Color Names
CSS Color HEX
Previous Next Chapter
CSS3 Text Effects
CSS3 Text Effects
CSS3 contains several new text features.
In this chapter you will learn about the following text properties:
text-shadow
word-wrap
Browser Support
The numbers in the table specifies the first browser version that fully supports the property.
Property
text-shadow 10.0 4.0 3.5 4.0 9.5
word-wrap 5.5 23.0 3.5 6.1 12.1
CSS3 Text Shadow
In CSS3, the text-shadow property applies shadow to text.
You specify the horizontal shadow, the vertical shadow, the blur distance, and the color of the shadow:
Example
Add a shadow to a header:
h1 {
text-shadow: 5px 5px 5px #FF0000;
}
Try it yourself
CSS3 Word Wrapping
If a word is too long to fit within an area, it expands outside:
This paragraph
contains a very long
word:
thisisaveryveryveryveryveryverylongword.
The long word will
break and wrap to
the next line.
In CSS3, the word-wrap property allows you to force the text to wrap - even if it means splitting it in the middle of a
word:
This paragraph
contains a very long
word:
thisisaveryveryveryv
eryveryverylongword.
The long word will
break and wrap to
the next line.
The CSS code is as follows:
Example
Allow long words to be able to break and wrap onto the next line:
p {
word-wrap: break-word;
}
Search w3schools.com:
WEB HOSTING
WEB BUILDING
W3SCHOOLS EXAMS
HTML, CSS, JavaScript,
PHP, jQuery, XML, and
ASP Certifications
SHARE THIS PAGE
WEB RESOURCES
Web Statistics
Web Validation
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY XML ASP.NET MORE...
Select Language
7/21/2014 CSS3 Text Effects
http://www.w3schools.com/css/css3_text_effects.asp 2/2
Previous Next Chapter
Try it yourself
CSS3 Text Properties
Property Description CSS
hanging-punctuation Specifies whether a punctuation character may be placed outside the line box 3
punctuation-trim Specifies whether a punctuation character should be trimmed 3
text-align-last Describes how the last line of a block or a line right before a forced line break is
aligned when text-align is "justify"
3
text-emphasis Applies emphasis marks, and the foreground color of the emphasis marks, to the
element's text
3
text-justify Specifies the justification method used when text-align is "justify" 3
text-outline Specifies a text outline 3
text-overflow Specifies what should happen when text overflows the containing element 3
text-shadow Adds shadow to text 3
text-wrap Specifies line breaking rules for text 3
word-break Specifies line breaking rules for non-CJK scripts 3
word-wrap Allows long, unbreakable words to be broken and wrap to the next line 3
REPORT ERROR | HOME | TOP | PRINT | FORUM | ABOUT | ADVERTISE WITH US
Top 10 Tutorials
HTML Tutorial
HTML5 Tutorial
CSS Tutorial
CSS3 Tutorial
JavaScript Tutorial
jQuery Tutorial
SQL Tutorial
PHP Tutorial
ASP.NET Tutorial
XML Tutorial
Top 10 References
HTML/HTML5 Reference
CSS 1,2,3 Reference
CSS 3 Browser Support
JavaScript
HTML DOM
XML DOM
PHP Reference
jQuery Reference
ASP.NET Reference
HTML Colors
Top 10 Examples
HTML Examples
CSS Examples
JavaScript Examples
HTML DOM Examples
PHP Examples
jQuery Examples
XML Examples
XML DOM Examples
ASP Examples
SVG Examples
Web Certificates
HTML Certificate
HTML5 Certificate
CSS Certificate
JavaScript Certificate
jQuery Certificate
PHP Certificate
XML Certificate
ASP Certificate
Color Picker
W3Schools is optimized for learning, testing, and training. Examples might be simplified to improve reading and basic understanding. Tutorials, references, and examples
are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using this site, you agree to have read and accepted our terms of use,
cookie and privacy policy. Copyright 1999-2014 by Refsnes Data. All Rights Reserved.

You might also like