Summary 2

Stylin' With CSS

Content, Structure, and Presentation

Content refers to all of the files, text, images, videos, etc. that you want to provide for your audience. Structure is defined by XHTML and allows you to set up your information by defining what each piece of content is. Presentation is defined by CSS and allows you to style your content for how you want it to be presented on your website.

Applying Attributes

Attributes help you to identify what your tags represent. If you insert an image in your coding program it will look something like this : <img src=”images/fido.gif>. This isn’t very helpful when you're trying to read your code and you don’t know what image you have inserted. Attributes allow you to give these tags a name. In your code this would look something like : <img src=”images/fido.gif alt=flower image>, so you would be able to see that the image is of a flower.

Future-Proof your Site

To prepare your site for future changes you can future-proof your code. Separating your content from your presentation allows you to easily update style changes without affecting the content. To do this you can create a style sheet by linking a separate file to your content in XHTML.