Can someone tell me what I am doing wrong?
โboldโ has never been an HTML element (โbโ is the closest match).
HTML should contain structured content; The CSS publisher should offer styles for this content. In this way, user agents can reveal structured content using useful styles and navigation controls for users who cannot see your proposed bold style (for example, search engine users, completely blind users using screen readers, visually impaired users, using their own colors and fonts, geeky users using text browsers, users of voice browsers such as Opera for Windows). So the right way to make the text bold depends on why you want to style it in bold. For example:
Want to distinguish headings from other text? Use header elements (from "h1" to "h6") and offer them a bold style for your CSS ("h1, h2, h3, h4, h5, h6 {font-weight: bold;}".
Want to strip ethics for form fields? Use the "label" element, programmatically associate it with the corresponding "select", "input" or "textarea" element, giving it the "for" attribute, corresponding to the "id" attribute for the target, and suggest a bold style for this inside your CSS (" label {font-weight: bold; "}).
Want to underline a heading for a group of related fields in a form, such as a group of radios? Surround them with the "fieldset" element, give it the "legend" element and suggest a bold style for it in your CSS ("legend {font-weight: bold;)").
Want to distinguish a table title from a table that it signs? Use the caption element and suggest a bold style for it in your CSS ("caption {font-weight: bold;)").
Want to distinguish table headers from table data cells? Use the "th" element and suggest a bold style for it in your CSS ("th {font-weight: bold;)").
Want to distinguish the name of the mentioned movie or album from the surrounding text? Use the "cite" element with the class ("cite class =" movie-title ") and suggest a bold style for it in your CSS (" .movie-title {font-weight: bold;} ").
Want to distinguish a specific keyword from the surrounding text that defines or explains it? Use the "dfn" element and suggest a bold style for it in your CSS ("dfn {font-weight: bold;}").
Want to distinguish some computer code from the surrounding text? Use the "code" element and suggest a bold style for it in your CSS ("code {font-weight: bold;)").
Want to distinguish a variable name from surrounding text? Use the "var" element and suggest a bold style for it in your CSS ("var {font-weight: bold;)").
Want to indicate that some text has been added as an update? Use the "ins" element and suggest a bold style for it in your CSS ("ins {font-weight: bold;)").
Want to emphasize some text ("I love kittens!")? Use the "em" element and suggest a bold style for it in your CSS (for example, "em {font-weight: bold;)").
Want to strongly emphasize some text, perhaps for a warning (" Beware of the dog! ")? Use a strong element and suggest a bold style for it in your CSS (for example, "strong {font-weight: bold;}").
... you get the idea (hopefully).
Can't find an HTML element with the right semantics to express / why / do you want to make this text bold? Wrap it in a generic span element, give it a meaningful class name that expresses your rationale for highlighting this text ("<span class =" lede "> Let me start this news article with a sentence that summarizes it. </span> ) and suggest a bold style for this in your CSS (".lede {font-weight: bold;"}. Before creating your own class names, you can check if there is a microformat (microformats .org) or a general convention for what you want to express.
Benjamin Hawkes-Lewis Jul 05 '09 at 19:20 2009-07-05 19:20
source share