HTML - Difference Between Id And Class?
What is the difference, and when would each be used?
Similar TutorialsI am a newbie/ beginner in web design. Have been learning html for about 3 months now and i still can't distinguish between when to use class or id property. I often use class/id property interchangeably in tags like <div></div>. I been reading alot of material on web about those 2 but yet dont know when to use them and why to use them. Any help will be much appreciated. Hey guys, Well I've been working on a website from my hostmatrix account and it all works ok. I'm now transferring all the files and images over to another server where our website is held but I can't seem to get some of the images working and I cannot for the life of me work out what's wrong. http://www.uptheshots.co.uk/ - Hosted HERE (at hostmatrix) http://www.redbluearmy.com/martin_test/index.php - This is where I'm moving to. On the first link you can see the background is not white but on the second link it is. I can't work out why though and what I've done wrong. The only difference is that at the moment I've got it in a sub-folder but I've changed all my links so it should work ok. If you need to see a file just tell me. To be honest I don't know where I should be looking but I'm guessing it's something to do with my css files and the images for the background. Thanks I'm rather new to HTML and thereforme I'm follwing a training by a rather good traininginstitute (a written training with assignments). My trainer corrected in an assignment my use of <br> with the <p></p> tag. What exctly is the difference (in effect) between the two? Paolok I am newbie and want to know the difference between HTML and XTHML Hi guys, Iv just downloaded the new version of visual studios, and before when i created new tables,rows,cells etc iv just wrote <table> <tr> <td> </td> </tr> </table> etc but now when i type this is to visual studio it gives me an error saying <tr> cant be nested within a div tag, iv searched the code for any div tags within the page and i cant find any, So my question is this whats the difference between Div tags and Tr etc, if i can get an understanding of this then ill start using the div tags etc..... Thanks. Hey guys if you look at my site in FF the hosting image proces are all level buy in IE the Business package it higher and I cant figure out why http://www.upfrontdesigns.co.uk/build/hosting.html Also in IE where the footer is there are 2 lines on the left and right handside which I belive are from the bottom shadow border how do I sort this problem as well. Many Thanks I need some help. There are some differences when viewing the page below in Firefox and IE. I want the user to see the Firefox version. To be more specific, I would like the IE version to show the following: -I do not want the grayish bar below the header -I want the subheading "Alphabet Flash Cards" to be centered with the images -I want the search box to be aligned right at the top below the header. I would like the page below to appear as it does in Firefox when viewing it in other browsers. Thanks for your help! http://www.havefunteaching.com/flashcards/alphabet-flash-cards.html text-decoration: none; } .style26 {color: #000000} .style28 {color: #000000; font-weight: bold; } .style29 { color: #FFFFFF; font-size: 24px; font-family: "Futura Md BT"; } .style30 { font-size: 15px } .style31 { font-size: 30px } --> </style> <script src="../Scripts/AC_RunActiveContent.js" type="text/javascript"></script> </head><div align="center"> <table width="970" border="0" cellpadding="0" cellspacing="0" background="../HaveFunHeaderImages/rep_1.jpg" bgcolor="#E6EBF1" style="background-image:url(http://wwww.havefunteaching.com/HaveFunHeaderImages/rep_1.jpg); background-position:top; background-repeat:repeat-x"> <tr align="left" valign="top"> <td width="411" height="150" nowrap background="../HaveFunHeaderImages/rep_1.jpg"><div class="style29" style="padding-left:20px; padding-top:1px"> <p align="center" class="style31">Have Fun Teaching</p> <blockquote> <p align="center" class="style30">The Ultimate Teacher Resource!</p> </blockquote> </div></td> <td width="101" background="../HaveFunHeaderImages/rep_1.jpg"><div align="right"><a href="iframe_0.html" target="cont"><img alt="" src="../images/HaveFunHeader/home.png" width="100" height="133" border="0"></a></div></td> <td width="101" background="../HaveFunHeaderImages/rep_1.jpg"><div align="right"><a href="iframe_1.html" target="cont"><img alt="" src="../images/HaveFunHeader/worksheets.png" width="100" height="133" border="0"></a></div></td> <td width="101" background="../HaveFunHeaderImages/rep_1.jpg"><div align="right"><a href="iframe_2.html" target="cont"><img alt="" src="../images/HaveFunHeader/songsandvideos.png" width="100" height="133" border="0"></a></div></td> <td width="101" background="../HaveFunHeaderImages/rep_1.jpg"><div align="right"><a href="iframe_3.html" target="cont"><img alt="" src="../images/HaveFunHeader/funactivitiesandgames.png" width="100" height="133" border="0"></a></div></td> <td width="101" background="../HaveFunHeaderImages/rep_1.jpg"><div align="right"><a href="iframe_4.html" target="cont"><img alt="" src="../images/HaveFunHeader/teacherresources.png" width="100" height="133" border="0"></a></div></td> <td width="54" background="../HaveFunHeaderImages/rep_1.jpg"> </td> </tr> </table> </div> What is the Basic Difference between CSS & CMS?both are useful for preparing website development or designing?I am little bit confused suggest me? Austin Condos,Austin Condos for sale What is the Difference between HTML and XHTML?I guess the code used in both of the languages is the same. Hi Can any one tell me is there any difference if a user enters '\n' (by typing) and by pressing ENTER key in an HTML form? Are both internally represented in a same way? Hi, What's the difference between basic html and asp.net? My friend that is a computer graphics designer and I asked him if he knew about the difference between that topics. He says not too much difference. I think he also never knew about the difference so he said that. I have a journal knowledge about HTML but ASP.net is new for me. Can any buddy explain me what is ASP. and what is the difference between both of languages. Thanks, Kunal singh Soniktechnologies Hi. What officially is supposed to be the difference between th "id" and "name" attribute according to HTML?? I know Javascript and CSS make a distinction between the two but as far as I can see the 4.01 spec makes no attempt to explain the difference, explanations of both seem like they do the same thing: both are supposed to be global unique, the spec even says they "share the same name-space" implying collisions implying they do the same thing. But I know name is not a valid attribute to alot of elements. Is it historical? Hi I am verymuch New this Html work. I had created a Html page having top,left,content page. i created font list like below combination Tahoma,verdana,arial,san-serif When i run the page in my system the Heading style in IE is different from FireFox browser. my question 1. Why it is different? 2. What is the meaning of creating four fonts in a list. please guide me kanish http://www.sandmanmedia.net/sandman_...anmedia_7.html When viewed in firefox, the 3 menu elements do not stay on the same line (services is bumped to the bottom). It is correct in Internet Explorer, and all 3 buttons are next to one another. Each button is 110px. The td width is set to 330px and set to bottom. Hi guys I'm thinking of making a mobile friendly version of my karaoke show site. Mainly I'd like to offer a mobile friendly version of my songlist. I was wondering what the main differences are between a mobile site like this: https://www2.my.commbank.com.au/mobile/i/default.aspx And the app version of the above banking site? I don't have a smart phone yet, so can't check myself, but will be getting one soon to aid in the site development. Does anyone know of a good tut on making mobile sites that fit the screen of a mobile? Cheers Shaun Which document type is easy and most used either Transitional or Strict? As I have validated my page using w3c validator it asks to define class for each and every thing like <table class="xx"> .xx {width:40%;} This makes maintainablility easy but if I have to define 20 different widths I cant use class names just for these widths.. Will Transitional doc type support this?? http://pizzarific.net84.net/ - please visit my website that i am developing for our php website. i have not yet embedded any php scripts there. please try to view the "pizza and food" both in firefox and IE7. how can resolve IE weird table width. Please help me. if you want i can give you my website files. thank you very much Can any one tell me that what is the basic difference between html and xhtml? Hi, I just changed some content in the middle of a oscommerce php page that I have been working with for a couple of years. I frequently add or change content in a table in this page. http://www.leavemeb.com/index.php Today, I added new stuff, pics, etc and used percentages in the tables to space things out well and so that when someone expands or condenses the browser window, the content adjusts accordingly. Now, in IE it shows up perfectly, yet in firefox on my mac it is very spaced out and can't even fit the whole page across without me having to scroll to the right to see the right collumn. Can anyone help me see what is not working here? I would be very grateful. I can't seem to see it. Nichole My apologies if I posted in the wrong forum, but I didn't know where else to post it, as it's not really "multimedia." I don't understand the difference between non-digest and digest mailing lists. I have a website for a record label, so I am using the "Mailman" program to set up a mailing list. It asks if I want my list members to be able to choose whether they want to receive emails immediately or in a batched digest, yes or no? If I choose no, it will default to batched digest. If I say yes, my list members will have to choose between the two, and I'm sure most people have no idea what the difference is. Why can't the default be non-digest? All I want is to send out the occasional email to tell the list members about a new album, and be able to receive replies from list members that everyone on the list (including myself) can read and re-reply if necessary. I don't even see the need to have it batched as a digest? I don't even really know what that does. Apparently, sends everything to you at a certain time at the end of the day? I'm very confused. |