kermitjohnson Posted April 14, 2009 Share Posted April 14, 2009 1. What is the difference between i tag and em tag? They both look the same. The address tag also looks the same. What else does this function do?2. <b> tag vs <strong> tag. I have heard that the strong tag is better.3. Why does the usemap need "name" and "id" What's the difference?4. I can't get the tutorial editor to display computer code on the "browser side." How would I display html code on a web page?Thank you for your help. Link to comment Share on other sites More sharing options...
jeffman Posted April 14, 2009 Share Posted April 14, 2009 <i> and <b> literally get rendered as italics and bold. <strong> and <em> (for emphasis) might get rendered those ways also, but it is up to the context. If a browser reads text aloud for the visually impaired, it may have a special way of indicating emphasis. Italics is always a visual thing.Originally, page elements did not have id's. Form elements and image maps and a few others could have name properties. For an image map, the name property is the traditional way of associating an image with a map. In theory, an id could do that same job. But the name property would have to remain also, so that old pages still worked. Since the name property must stay, there is no sense duplicating that functionality with an id. So the name it is.Since multiple form elements (like radio buttons) can have the same name, the name property is useless if you want a 100% unique way of identifying an element. So the id property was created. This is especially useful when referencing an element in JavaScript or CSS. I don't understand your 4th question. Link to comment Share on other sites More sharing options...
Guest FirefoxRocks Posted April 15, 2009 Share Posted April 15, 2009 1. What is the difference between i tag and em tag? They both look the same. The address tag also looks the same. What else does this function do?The i tag is for adjusting the presentation, the em tag is for emphasizing something. Even though they look alike, the i means nothing but the em actually emphasizes the text. Don't use em to italicize things though, only use it for emphasizing phrases, etc.2. <b> tag vs <strong> tag. I have heard that the strong tag is better.Same thing. The b tag adjusts the text to bold it, the strong tag strongly emphasizes the text. Don't use strong to darken the text, use it to make a strong point.4. I can't get the tutorial editor to display computer code on the "browser side." How would I display html code on a web page?Thank you for your help.If you need to display HTML code, you type it like this:<p> this is how you do a paragraph It comes out as: <p>this is how you do a paragraph Link to comment Share on other sites More sharing options...
kermitjohnson Posted April 16, 2009 Author Share Posted April 16, 2009 <i> and <b> literally get rendered as italics and bold. <strong> and <em> (for emphasis) might get rendered those ways also, but it is up to the context. If a browser reads text aloud for the visually impaired, it may have a special way of indicating emphasis. Italics is always a visual thing.Originally, page elements did not have id's. Form elements and image maps and a few others could have name properties. For an image map, the name property is the traditional way of associating an image with a map. In theory, an id could do that same job. But the name property would have to remain also, so that old pages still worked. Since the name property must stay, there is no sense duplicating that functionality with an id. So the name it is.Since multiple form elements (like radio buttons) can have the same name, the name property is useless if you want a 100% unique way of identifying an element. So the id property was created. This is especially useful when referencing an element in JavaScript or CSS. I don't understand your 4th question. Link to comment Share on other sites More sharing options...
kermitjohnson Posted April 16, 2009 Author Share Posted April 16, 2009 Thank you for your help.Regarding the fourth question.How would you display markup tags so visitors could see the actual code?Thank you Link to comment Share on other sites More sharing options...
Synook Posted April 16, 2009 Share Posted April 16, 2009 If you need to display HTML code, you type it like this:<p> this is how you do a paragraph It comes out as: <p>this is how you do a paragraph Basically, you turn the reserved characters into entities. Link to comment Share on other sites More sharing options...
jlhaslip Posted April 16, 2009 Share Posted April 16, 2009 <b> and <i> are considered 'presentational' tags and should not be used with a strict Doctype.<strong> and <em> are preferred.Use css to alter the attributes of the strong and em tags. For example, you might change colours to emphasize a <em> text string. When the Template changes, simply alter the attributes for the <em> tag to affect the text-string style. Link to comment Share on other sites More sharing options...
thescientist Posted April 16, 2009 Share Posted April 16, 2009 Thank you for your help.Regarding the fourth question.How would you display markup tags so visitors could see the actual code?Thank youAny visitor to your site can see the page source code by right clicking on the page. Stuff like PHP (server-side scripting) will not show up though. You can do the same thing to any site you see, escpecially if there's something on the site you like and you want to try and learn how they did it. Link to comment Share on other sites More sharing options...
jlhaslip Posted April 16, 2009 Share Posted April 16, 2009 see this link Link to comment Share on other sites More sharing options...
An Alien Posted April 18, 2009 Share Posted April 18, 2009 I wish you could just put the <pre> tags around a code and it would display the whole thing. That would be soo much easier. Link to comment Share on other sites More sharing options...
Guest FirefoxRocks Posted April 18, 2009 Share Posted April 18, 2009 I wish you could just put the <pre> tags around a code and it would display the whole thing. That would be soo much easier.On Windows if you use Notepad++, you can type out your normal code, select (highlight) it, go to TextFX->TextFX Convert->Encode HTML so that it automatically converts < > & and " to their entities. Link to comment Share on other sites More sharing options...
fabs Posted April 18, 2009 Share Posted April 18, 2009 1. What is the difference between i tag and em tag? They both look the same. The address tag also looks the same. What else does this function do?2. <b> tag vs <strong> tag. I have heard that the strong tag is better.3. Why does the usemap need "name" and "id" What's the difference?4. I can't get the tutorial editor to display computer code on the "browser side." How would I display html code on a web page?Thank you for your help.for your question number 4please try to enable your java and javascript of your browser.in mozilla firefox just tools > option > content Link to comment Share on other sites More sharing options...
An Alien Posted April 19, 2009 Share Posted April 19, 2009 There are a lot of things (tags, attribute) that mean the same thing in HTML and CSS. For example, <b> and <strong> which are the same but should be used in different situations. And in CSS for example maximum width can be the same as if you set margins or set the width, and like ID and class. It makes it very confusing, IDK. I dunno, I don't feel like making a whole new thread about it, but can someone tell me the difference between the id and class attributes? They both work in CSS the same way. The ? is sorta related to the topic of similar tags/attributes so I post the ? here. Link to comment Share on other sites More sharing options...
jlhaslip Posted April 19, 2009 Share Posted April 19, 2009 Biggest differences are that an ID should only be used once per page, Classes can be used multiple times per page.An ID is more 'specific' and has more strength than a class, too. Styles for an id will over-ride a class. Link to comment Share on other sites More sharing options...
fabs Posted April 19, 2009 Share Posted April 19, 2009 thats right Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.