<!DOCTYPE html>
<html>
<head>
<style>
span { color: white; background: black; }
html { font-size: 2em; color: black; background: white; }
</style>
</head>
<body>
<fieldset>
<legend><span>L</span>egend text</legend>
</fieldset>
</body>
</html>