Horje

How to Use CSS to style the <code> element

Follow the Example.
index.html
Example: HTML
<style>
code {
  font-family: Consolas,"courier new";
  color: crimson;
  background-color: #f1f1f1;
  padding: 2px;
  font-size: 105%;
}
</style>

<p>The HTML <code>button</code> tag defines a clickable button.</p>
<p>The CSS <code>background-color</code> property defines the background color of an element.</p>

Output should be:

How to Use CSS to style the <code> element




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