div:before {
content: '<b>'
}
div:after {
content: '</b>'
}<style>
div{font-weight: bold}
div::before {
content: attr(data-1);
font-weight: normal;
}
div::after {
content: attr(data-2);
font-weight: normal;
}
</style><div data-1="Вот он" data-2="текст!">
выделенный
</div>