Css Course

The texts cover a large portion of Web pages. Styling the text may improve the appearance of web pages and can draw attention to certain elements of the text.


The letter-spacing property controls the spacing of each character in a word.

- Values: - Syntax:
selector { letter-spacing: value; }
#idp { letter-spacing: 4px; }

<h4>Example letter-spacing</h4>
<p id='idp'>Web site: CoursesWeb.net</p>


The word-spacing property increase or decrease the space between words.
- Values: - Syntax:
selector { word-spacing: value; }
#idp { word-spacing: 0.5em; }

<h4>Example word-spacing</h4>
<p id='idp'>Free courses and tutorials.</p>


The line-height property sets the distance between lines.
- Values: - Syntax:
selector { line-height: value; }
#idp { line-height: 185%; }

<h4>Example line-height</h4>
<p id='idp'>First line text<br>
A second line ...<br>
Another line in the paragraph.</p>


The text-transform controls the capitalization of text.
- Values: - Syntax:
selector { text-transform: value; }
#idp { text-transform: capitalize; }

<h4>Example text-transform</h4>
<p id='idp'>free CSS course and lessons.</p>


The text-align defines the horizontal alignment of text inside a containing block.
- Values: - Syntax:
selector { text-align: value; }
#idp1 { text-align: right; }
#idp2 { text-align: center; }

<h4>Example text-align</h4>
<p id='idp1'>Text with right align.</p>
<p id='idp2'>Paragraph with center align.</p>


The vertical-align sets the alignment of text (or other inline content) in relation to the line box controlled via line-height.
Because this property controls the positioning of an inline element in relation to a line box and not a block element, it is not suitable for aligning block elements in a layout grid.
- Values: - Syntax:
selector { vertical-align: value; }
.sp1 { vertical-align: sub; }
.sp2 { vertical-align: super; }

<h4>Example vertical-align</h4>
<p>Some text: <span class='sp1'>sub span</span> and a <span class='sp2'>super span</span> sub-string.</p>


The text-indent defines an indentation for the first line of text in a block.
- Values: - Syntax:
selector { text-indent: value; }
p { text-indent: 20px; }

<h4>Example text-indent</h4>
<p>The first line of the paragraph, with indentation,<br>
The second line ...</p>


Via the text-decoration property you can set underlines, strikethrough, or other text decorations (even blink).
- Values: - Syntax:
selector { text-decoration: value; }
.sp1 { text-decoration: underline; }
.sp2 { text-decoration: overline; }
.sp3 { text-decoration: line-through; }

<h4>Example text-decoration</h4>
<p>Some text: <span class='sp1'>underline span</span>, a <span class='sp2'>overline text</span> and a <span class='sp3'>line-through</span> sub-string.</p>


The white-space sets how white space inside an element is handled.
- Values: - Syntax:
selector { white-space: value; }
p { white-space: pre; }

<h4>Example white-space</h4>
<p>The first line of the paragraph with more spaces between words.
The second line, without BR tag.</p>


With word-wrap you can allow browsers to break lines in the middle of words to prevent long strings of characters from overflowing a box.
- Values: - Syntax:
selector { word-wrap: value; }
p {
 width: 88px;
 word-wrap: break-word;

<h4>Example word-wrap</h4>
<p>Short paragraph with looooooooonnnnnnggggg wwwoooooorrrrrddddddsssss.</p>


The text-shadow property introduced in CSS3 allows for one or more shadow effects to be applied to the text of an element. This shadow is drawn around the letters themselves (not supported in Internet Explorer).
- Values: - Syntax:
selector { text-shadow: h-shadow v-shadow blur color; }
h3 { text-shadow: 3px 5px 2px green; }

<h4>Example text-shadow</h4>
<h3>Web site: marplo.net</h3>

Daily Test with Code Example

Which HTML5 tag defines marked text? (can be used to highlight parts of text)
<mark> <embed> <span>
<p>Free corses: <mark>coursesweb.net</mark> for Web Development.</p>
Which CSS pseudo-class adds a style to an element when the mouse is over it?
:focus :hover :active
a:hover {
  font-weight: bold;
  color: #00da01;
Click on the function which returns a string value that represents the number rounded to the x digits after the decimal point.
toPrecision(x) toFixed(x) floor(x)
var num = 12.34567;
num = num.toFixed(2);
alert(num);       // 12.35
Indicate the PHP function which reads an entire file into an array.
[) file() readfile()
$arr = file("a_file.txt", FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
Configuring Text

Last accessed pages

  1. SSEP - Site Search Engine PHP-Ajax (9770)
  2. querySelector and querySelectorAll (19414)
  3. PHP Method Chaining (2748)
  4. Node.js Move and Copy Directory (10181)
  5. $_GET, $_POST and $_REQUEST Variables (30794)

Popular pages this month

  1. Courses Web: PHP-MySQL JavaScript Node.js Ajax HTML CSS (459)
  2. The School for Gods (335)
  3. PHP-MySQL free course, online tutorials PHP MySQL code (227)
  4. Add, Change, and Remove Attributes with jQuery (210)
  5. PHP Unzipper - Extract Zip, Rar Archives (206)