<!DOCTYPE html> <html> <head> <style> div p{ font-weight:900px; background-color:green; } </style> </head> <body> <div> <p>It is a descendent of div element.</p> </div> <div> <code><p> The paragraph may be a grand descendent. </p></code> </div> Note: The position of p tag as a descendent of div </body> </html>
Run
×
Share