Ok ive been learning xhtml and about css and i have some questions that need to be cleared up for me. XHTML: 1) Do you save the file as .xhtml or .html . I was redign that not every browser will open an .xhtml correctly so save it as .html? 2) Do i have to learn all of the tags from html 4.0 to use in xhtml as they are the same. CSS: 1) Do you write a css code into a .xhtml file or add an external one when coding for a customer. 2) When adding a background image will it multiply like a bunch of tiles or stay like a whole image? 3) When applying CSS Margin do you apply it to the whole window or just an object. 4) When making a content box can you make a background as certain image or do you have to make it a certain colour and how do you make rounded edges. Thanx for help i will be asking more questions later on as i discover more. I will try to code a simple easy template to see how it goes.
A properly configured web server will serve .xhtml as application/xhtml+xml, which IE does not support. Use the .html extension and use the meta <meta http-equiv="content-type" content="text/html; charset=utf-8" /> Code (markup): Yes, you should learn all the html 4 elements and their attributes. Granted, you won't use but a few most of the time. It will surprise you, though, the number of times an arcane, seldom used element is just what you need. Do not waste your time with any deprecated elements or attributes. Do keep in mind the syntactical differences between html and xhtml. The style attribute within an element should be strictly avoided. You may add styles within the style element in the head section, but an external css file is best practice. By default, the whole image will tile. Study the background property for the details. You apply a margin to the element you wish to have a surrounding space. Do read up on margin collapse and on margins applied to inline elements. See above on the background property. Save the rounded corners 'til you at least have the basics well and truly understood. There are many methods for css based rounded corners. Google is your friend. cheers, gary