Jasper Peters Jasper Peters - 6 months ago 10x
HTML Question

Links with multiple text styles

I have a page with a overview of news articles. It displays the title and the author of the article and it uses a link to go to the article if someone clicks on it. What I want is the Title of the article to be bold but the author shouldn't be bold. If i try to do this I get the bold tags as text on the page instead of the title becoming bold.

<a href="url">LINK! by User</a>

What I want is LINK! to be bold but the rest of the text to not be bold

<a href="link"><b>LINK!</b> by User</a>

Above will have the bold tag as text and wont make link bold. I don't want to make them 2 separate links to the same destination as it would look ugly!

<a href="link"><b>LINK!</b> by User</a> 

displays the "LINK!" as bold as "by User" as not bold for me across Chrome, Safari, and FF. Are you sure you're not doing anything to escape the content that's inside the link text?

These will both accomplish what you're looking to do, so I'm guessing there is something else going on.

    <style type="text/css">
        .first-part {
            font-weight: bold;
    <a href="#"><span class="first-part">first part</span><span class="second-part">second part</span> </a>
    <br />
    <a href="link"><b>LINK!</b> by User</a>