Horje

How to add Default CSS Settings HTML <pre> Tag for coing view

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

index.html
Example: HTML
<!DOCTYPE html>
<html>
<head>
<style>
pre {
  display: block;
  font-family: monospace;
  white-space: pre;
  margin: 1em 0;
} 
</style>
</head>
<body>

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

<pre>
Text in a pre element
is displayed in a fixed-width
font, and it preserves
both      spaces and
line breaks
</pre>

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

</body>
</html>

Output should be:

How to add Default CSS Settings HTML <pre> Tag for coing view




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