font border css code example

Example 1: how to make border for letters in css

h1 {
    /* 1 pixel black shadow to left, top, right and bottom */
    text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;

    font-family: sans; color: yellow;
}

Example 2: text border css

h1 {
  -webkit-text-stroke: 1px black;
}

Example 3: html font white text with black border

h1 {
    color: yellow;
    text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
}
<h1>Hello World</h1>

Example 4: css border top

.topBorder {
  /*        width style color  */
  border-top: 5px solid black;
}

Example 5: css text color border

h1 {
  text-shadow: 1px 1px #ffffff;
}

Example 6: how to make border for letters in css

h1 {
    -webkit-text-stroke: 2px black; /* width and color */

    font-family: sans; color: yellow;
}

Tags:

Css Example