::before





css/style.css
  • p::before {
  •  content: "This is a ";
  •  color: #852E76;
  •  font-size: 1.2em;
  • }
p::before {
 content: "This is a ";
 color: #852E76;
 font-size: 1.2em;
}


index.html
  • <!DOCTYPE html>
  • <html>
  • <head>
  •  <meta charset="utf-8" />
  •  <title>New Page</title>
  •  <link href="css/style.css" rel="stylesheet" />
  • </head>
  • <body>
  •  <p>London</p>
  •  <p>Kiev</p>
  •  <p>Moscow</p>
  • </body>
  • </html>
  • <!DOCTYPE html>
  • <html>
  • <head>
  •  <meta charset="utf-8" />
  •  <title>New Page</title>
  •  <link href="css/style.css" rel="stylesheet" />
  • </head>
  • <body>
  •  <p>London</p>
  •  <p>Kiev</p>
  •  <p>Moscow</p>
  • </body>
  • </html>