Jump to content

Some Questions About The "formatting Tags".


atar.yosef
 Share

Recommended Posts

Hello to all!!!Can some of the users here to help me to know what is the difference between the different "formatting tags" as it is called at the "w3schools tutorials"? and I am going to details:1) what is the different between the <b> and the <strong> tags, if they both are rendered to the browser as the same format?2) at the "computer tags" as they called at the "w3schools tutorials" there are also some tags who are rendered to the browser as the same format e.g. the following tags:<code> <kbd> <tt> <samp> and there are more.I will be happy if one of the users will help me with this as soon as possible!!!

Link to comment
Share on other sites

<b> is a presentational tag and should make the text BOLD<strong> is also presentational, and should be used when you want to apply other formatting than BOLD.Actually, because they "style" the text, you should not be using them in your HTML codes. Use class and ID instead for presentational formating..bold { ... define the class attributes here... }.strong { ... define the class attributes here... }<p class="bold"> this text is bold.</p><p class="stong"> this text is strong.</p>This will allow for a separation of content (html) and styling (css),

Link to comment
Share on other sites

If you just want to change the style of one or a few words, use the <span> tag with CSS as jlhaslip explained.<p>This is my <span class="bold>special</span> paragraph.</p>Some presentation tags are okay to use, but they also have meaning. Visual browsers may display a lot of different tags the same way (bold, italic, monospace, etc.). But not all browsers are visual. A browser that reads text outloud for the blind won't be helped if you style a word in red, for example. But if you put it in <strong> tags, the content-reader knows to verbalize it differently.This is why some tags still exist, but others have been deprecated. A tag like <strong> suggests something about the meaning of the content. A tag like <font> does not.But it is NOT appropriate to use a "presentation" tag when you only wish to change the appearance. This is the kind of non-semantic styling that jl was warning about, and it can be misleading to browsers designed for people with different needs.

Edited by Deirdre's Dad
Link to comment
Share on other sites

Hello!!If you read my PM that I sent you, please response me here or at PM about my PM content that I sent you.was this your intention?

If you just want to change the style of one or a few words, use the <span> tag with CSS as jlhaslip explained.<p>This is my <span class="bold>special</span> paragraph.</p>Some presentation tags are okay to use, but they also have meaning. Visual browsers may display a lot of different tags the same way (bold, italic, monospace, etc.). But not all browsers are visual. A browser that reads text outloud for the blind won't be helped if you style a word in red, for example. But if you put it in <strong> tags, the content-reader knows to verbalize it differently.This is why some tags still exist, but others have been deprecated. A tag like <strong> suggests something about the meaning of the content. A tag like <font> does not.But it is NOT appropriate to use a "presentation" tag when you only wish to change the appearance. This is the kind of non-semantic styling that jl was warning about, and it can be misleading to browsers designed for people with different needs.
Link to comment
Share on other sites

OK, so I ask you again, was it your intention, that the "presentation tag" was "dedicated" (it is to say: their target was...) not for styling the text, but only to mention and note about the text importance only?? :)

I received a PM. I did not respond because it did not sound like a question. Please post a new message here so everyone can help. :)
Link to comment
Share on other sites

Note: the HTML specification is produced by the World Wide Web Consortium (W3C), not Deidre's Dad :) If you want to read up on their original intentions the HTML 4.01 spec is publicly available at http://www.w3.org/TR/html4/.Anyway, the purpose of presentation tags like <b> is just to style the text. They, semantically, have no meaning, as opposed to tags like <strong> and <em>, which do indicate something about their contents (e.g. it's strong, or emphasized). Recent trends in HTML coding have been to separate the structure and meaning of the page (as given by the HTML markup) from the presentation, which is moved away into CSS stylesheets. So if you just wanted to change the look of the page, you would in the past have used a presentation tag, but you would now use CSS. However, if you wanted to actually indicate emphasis, strength, whatever in the code, you would use one of the more meaningful HTML tags (e.g. <strong>, <em>, <strikethrough>).

Link to comment
Share on other sites

From the specification itself:

The presentation of phrase elements depends on the user agent. Generally, visual user agents present EM text in italics and STRONG text in bold font. Speech synthesizer user agents may change the synthesis parameters, such as volume, pitch and rate accordingly.
The user agent is a browser. They're saying that any browser can present <strong> and <em> and similar tags any way they want to, as long as they are true to the meaning of strong and emphasis. If all browsers today use bold for one and italics for another, that is a coincidence that might change with the next browser release.But you can always count on CSS.Now, to be completely honest, you can actually use CSS to override the style definitions of the <strong> and <em> types so that their look IS consistent among browsers. To do that correctly, you should use a @media rules to indicate that the changes you are making apply only to screen and/or print. http://www.w3schools.com/CSS/css_mediatypes.asp
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...