HTML
CSS
JavaScript
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Text Decoration Example</title> <style> body { font-family: Arial, sans-serif; padding: 20px; } .decorated-text { font-size: 24px; margin-bottom: 20px; } .underline { text-decoration: underline; } .line-through { text-decoration: line-through; } </style> </head> <body> <h1 class="decorated-text">Welcome to CSS Text Decoration!</h1> <p class="decorated-text">This paragraph demonstrates <span class="underline">underlined text</span> and <span class="line-through">strikethrough text</span>.</p> </body> </html>
// No JavaScript required for this demo
Text Decoration Example
Welcome to CSS Text Decoration!
This paragraph demonstrates
underlined text
and
strikethrough text
.