14

<b> or <strong> ?

#WhatTheHTML

Comments
  • 6
    Neither. Use css :P
  • 3
    <span class="fat">

    #fat {

    font-wheight: 140;

    }
  • 1
    @MaLiN2223 Agree. But...

    #bolded-text-id {
    font-weight: bold;
    }

    <span id="bolded-text-id">only bold this</span>

    --VS--

    <b>only bold this</b>
  • 0
    @corscheid from experience: in a few weeks it is going go be changed to red and font to XYZ.
    Next few weeks and client is going to say "I want this super fancy markup what I saw on ABC website"

    In Web development it's better to be over prepared :P

    Edit: And also you block yourself from doing multiple layouts.
  • 0
    @corscheid ++ exactly my point.
  • 4
    You should use <strong> to encode intent, not style. CSS is for styling.
  • 4
    HTML tags are used for intent.

    B is no longer recommended for emphasis, since strong exists.

    I use B.

    If you need to style. Use context styling.

    .context strong {}
  • 4
    <b></b> is deprecated, <strong></strong> is the proper element, but for visualization, you should use custom CSS. However, for accessibility options, you should still use the strong element because modern browsers will pronounce strong elements differently
  • 2
    @lurch This is the correct answer. Well put!
  • 0
    @corscheid IDs have dots at the beginning in css, dont they?
  • 0
    @Artemix me=html pro (really. I am... NOT)
Add Comment