<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>CSS positioning</title> <style> p { width: 250px; padding: 15px; } .up { background: yellow; position: absolute; top: 0; } .down { background: purple; position: absolute; bottom: 0; } </style> </head> <body> <p class="up">This is a frist paragraph..</p> <p class="down">This is a next paragraph.</p> </body> </html>