Jump to content

Question about tags


gregfletcher

Recommended Posts

I have decided to learn more about HTML. so I'm going through your online classes. I have a question concerning the differences between some similar tags and which one to use.On page http://www.w3schools.com/html/html_formatting.asp The "text formatting" link gives you lots of choices. My question is that when I go through these examples, which ones should you use in relation to others that are similar. Example, bold vs. strong. Italics vs. Emphasize. What are the purposes of Big and Small? How do these tags affect search engine rankings? Do these tags have any affect on creating an accessible sites?These questions go for these others too.<Pre><code> vs <kbd> vs <tt> vs <samp> vs <var> When should you use these in realtion to each other?I understand that lot of the tags were created a long time ago and are obsolete. I just need to know how they are relevant now and which ones should be used.Is there any books or reference that talks about the use of HTML tags and the philosophy of what to use and what to ignore?Thank you in advance.

Link to comment
Share on other sites

Good question, I had noticed it before but never thought about it, just kind of went on with things. Well, to answer you, it appears that the reason for some of the duplicate tags are because of a transition from HTML to XHTML (somebody please correct me if I am wrong, since its just a guess :) ). If you look at the next version of XHTML (2.0), you can see that the <b>, <i>, and <tt> are not there. As far as what the differences are between the rest of the tags, well I think it is purely to help identify what the text is, rather than format it properly. These are just my guesses after thinking about it and looking at it, although I must admit that I look forward to hearing if any others can shed a little more light on the subject :)

Link to comment
Share on other sites

I can take a stab at a couple of things here - first <b> vs. <strong> and <i> vs. <em>. I personally use <strong> and <em>. I prefer these for three reasons.a.) they are words and therefore are more descriptive.b.) they are easier to manipulate/catch when doing global find and replacements.c.) about three years ago I worked on a site (http://www.infinitec.org/ - but not that version) which deals with assistive technology. Things might have changed since then, but screen readers would actually speak louder for <strong> and also elongate the spoken word in the <em> tag - where the <b> and <i> tags were ignored.I've never used <big> or <small> and only <pre> from the others you mention. Irregardless, stylesheets are replacing most of these tags and therefore I haven't found a reason to start using the ones I haven't been.One thing I have begun to do is to incorporate the <h1> through <h6> tags more on my sites. And to address your search engine question, only the "h" tags are given a higher relavence by many search engines. However, many also penalize you for using them more than once on a single page.Hope that helped at least a little.P.S. Keep an eye on this page:http://www.w3schools.com/tags/it will help you keep focused on the tags you should be and will need to be using.

Link to comment
Share on other sites

actually <b> and <i> were replaced in XHTML 1.0 (if you use Strict not Transitional)Transitional is not true XHTML, it just lets you use the XHTML doctype and continue as you did in HTML 4.Use XHTML 1.1 there are no Transitional/strcit/etc. It is just XHTML 1.1, period.And yes that is the reason for some duplicate tags, some may appear the same but do have slit diiferences, many of which are acheived with CSS so many tags are now obselete.

Link to comment
Share on other sites

Great feedback. Thank you.I just want to use the most appropriate tags to maximize search engine placement as well as function and accessibility.The main reason I am actually getting into this is because I want to start using CSS and eventually become very proficient. I thought it would be wise to understand HTML beforte I delved into CSS. Let me ask this...what path do you think would be best? HTML > XHTML >CSS? I currently use Dreamweaver 8 and want to create better use of CSS as well as understanding the CSS as well. Any input would be greatly appreciated.

Link to comment
Share on other sites

Forget dreamweaver. It's great for nice layouts, but it's limits are amazingly small. This should be your path for learning in my opinion, I included all the languages. :)html>>javascript>>css>>xhtml>>php/sql>>asp:)

Link to comment
Share on other sites

Strong and Em are for emphasize. Like this is <strong>strong</strong> emphasizing. B and I are for presentation which is CSS' job, but you could still use them, for example, to describe the act of using bold and italic text: "Microsoft Word allows you to use <b>bold</b> and <i>italic</i> text".Same thing for big and small. Use big to say things like "Woa, that cat was <big>big!</big>." or "I am <small><small>not</small></small>perfect. :)". These are good content uses for them. If you just want to use small or big text by default for a menu for example, that's where CSS comes in.

Link to comment
Share on other sites

with there being very little difference between XHTML and HTML, I'd be tempted to suggest:XHTML, CSS, javascript and then a server side scripting language like cold fusion, php, or asp.I have to disagree with Chocolate570 regarding Dreamweaver. I'd go along with suggesting to use Notepad to begin your learning, but Dreamweaver is a very powerful tool - but I would ONLY recommend using it inn CODE MODE - never in Design Mode.Any WYSIWYG is nothing more than fast food to web development - it may satisfy a short term craving, but you'll only end up out of shape and overweight in the long run.:)

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
×
×
  • Create New...