<!doctype html>
<html>
<head>
<style>
ul {
    display:inline;
}
ul::before {
    content: 'before';
}
ul::after {
    content: 'after';
}
</style>
</head>
<body>
<ul><li>1</li><li>2</li><li>3</li></ul>
</body>
</html>
