Horje

How to set Default CSS Settings on HTML <p> Tag

Most browsers will display the <p> element with the following default values.

index.html
Example: HTML
<!DOCTYPE html>
<html>
<head>
<style>
p {
  display: block;
  margin-top: 1em;
  margin-bottom: 1em;
  margin-left: 0;
  margin-right: 0;
}
</style>
</head>
<body>

<p>A p element is displayed like this:</p>

<p>This is a paragraph.</p>

<p>Change the default CSS settings to see the effect.</p>

</body>
</html>

Output should be:

How to set Default CSS Settings on HTML <p> Tag




Type:
html
Category:
Web Tutorial
Sub Category:
HTML Tag
Uploaded by:
Admin