p { color: red; text-align: center; }
p { color: red; /* This is a single-line comment */ text-align: center; } /* This is a multi-line comment */
body { background-image: url("bgdesert.jpg"); }
a { color: hotpink; }
<div style="background-color:black; color:white; padding:20px;"> <h2>Hello</h2>
<p>Hello Worldlt;/p> </div>
An inline element does not start on a new line and only takes up as much width as necessary.
This is an inline <span> element inside a paragraph.
Examples of inline elements:
<h1>My <span style="color:red">Important</span> Heading</h1>