How to find content without specific tag

1

I'm in a situation where I need to find content without a specific tag. Of course, any content is surrounded by a tag, even if it is body or html . With the example it becomes clearer what I need:

<div class='texto'>
<p>Essa imagem é muito bonita!</p>
<img src='imagens.png'/>
Foi tirada em Munique, Alemanha
</div>

In this case, I need to style the same way both texts, both what is involved by p and what is directly played in div . Because when I need to use attributes in css like line-height or something like that, styling does not get cool. I wanted to see how best to select this loose content in div

    
asked by anonymous 14.09.2016 / 16:38

1 answer

4

Example: Any formatting that the% parent has the daughters will inherit.

<div class='texto'>
<p>Essa imagem é muito bonita!</p>
<img src='imagens.png'/>
Foi tirada em Munique, Alemanha
</div>
<style>
.texto{
	font-size:20px;
	color: #006633;
	}
</style>
    
14.09.2016 / 16:44