Skip to content

LilR3d/HTML-Preformatted-Text

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

HTML-Preformatted-Text

Overview

This project demonstrates the use of the <pre> HTML element to display preformatted text. The <pre> element preserves whitespace, indentation, and line breaks, making it ideal for showing code blocks or structured text.

Features

  • Explanation of what the <pre> element is.
  • Side-by-side comparison of regular text vs preformatted code.
  • Example of JavaScript code formatted inside a <pre><code> block.
  • Styled with a separate CSS file for readability and elegance.

Files

  • index.html → The main webpage.
  • styles.css → Styles for layout, typography, and <pre> formatting.
  • README.md → Project documentation (this file).

How to View

  1. Clone the repository or download the index.html file.
  2. Open index.html in a web browser to view the preformatted text examples.
  3. Modify the content within the <pre> tags to display your own preformatted text.

Example Preview

The page shows:

  • A short explanation about <pre>.
  • A block of preformatted notes.
  • A JavaScript example in plain text vs preformatted code.

License

This project is for learning purposes. Free to use and adapt.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published