Home
HTML
HTML CSS
Example 6: HTML CSS
Run ❯❯
<!DOCTYPE html> <html> <head> <title>Add Border Example</title> <style> h1 {border: 2px solid blue;} p {border: 4px solid red;} </style> </head> <body> <h1>This heading has a border around it</h1> <p>The paragraph has 4px border around it in red color.</p> </body> </html>