Error in the 'content' of css

-1

HTML and CSS

Problem:

Thecontentofthepelementdoesnotappearonthepage,itfillsthespace,butdoesnotappear...

    
asked by anonymous 27.08.2016 / 21:44

1 answer

1

Is the value of content a required source? And if it is, the correct use must be in :before or after of the element according to W3C . Example:

#app {
  position: relative;
  background-color: #ddd;
  color: #666
}

#app:after {
  position: relative;
  content: 'div';
  margin-left: 5px;
  color: red;
}
<div id="app">Qual a sua TAG?</div>
    
27.08.2016 / 21:56