How to change text using CSS

In this article I am going to explain how to change/alter the text using CSS.

Here in this tutorial I am going to tell you how we can change the text of div, span, button etc. using CSS. We use CSS Pseudo-elements (::after or :after).


HTML Markup:

<html xmlns="">
<head runat="server">
    <title>CSS Tricks</title>

        .btnsubmit {
  text-indent: -9999px;
  line-height: 0;

.btnsubmit::after {
  content: "Click Here";
  text-indent: 0;
  display: block;
  line-height: initial;

    .div1 {
  text-indent: -9999px;
  line-height: 0;

.div1:after {
  content: "Sql server article";
  text-indent: 0;
  display: block;
  line-height: initial;

.div2 span{
   content: "Sql server tutorial";  
    <form id="form1" runat="server">
    <legend>change text using CSS </legend>
    <button class="btnsubmit">Submit</button>
      <br />
     <div class="div1"> article</div>
     <br />
    <div class="div2"><span> tutorial</span></div>

Post a Comment



Contact Form


Email *

Message *

Powered by Blogger.
Javascript DisablePlease Enable Javascript To See All Widget