12.09.2015 Views

Boot Camp

Web Authoring Boot Camp - StudioBast

Web Authoring Boot Camp - StudioBast

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Styling Code, Part 1<br />

Inline Cascading Styles Quick Examples<br />

These are not exhaustive, but give a good sampling. You will want to download a current<br />

CSS Cheatsheet for your own use: http://www.cheat-sheets.org/#CSS<br />

• Body: <br />

• Text: <br />

• Text:<br />

• Text:<br />

• Text:<br />

• Image: <br />

• Image /text wrapping: for a left image wrap, and<br />

float:left for a right image wrap.<br />

• Table:<br />

• Table: <br />

• Table: <br />

• Table, tr, and td tags allow vertical alignment, background color, vertical alignment<br />

• Text tags allow text alignment, color, and font variations<br />

• Font color: style=”color:black;”<br />

• Text alignment: style=”text-align:center;”<br />

• Vertical alignment for tables: style=”vertical-align:top;”<br />

• Border: style=”border:1px;”<br />

• Background Color: style=”background-color:green;”<br />

Inline Cascading Styles<br />

Inlining style is far more inflexible than the other methods. To use inline style, one must<br />

declare a single style sheet language for the entire document using the Content-Style-<br />

Type HTTP header extension. With inlined CS, an author must send text/css as the Content-Style-Type<br />

HTTP header or include the following tag in the head section:<br />

<br />

Inlining style loses many of the advantages of style sheets by mixing content with presentation.<br />

As well, inlined styles implicitly apply to all media, since there is no mechanism<br />

for specifying the intended medium for an inlined style. Normally this method should be<br />

used sparingly, such as when a style is to be applied on all media to a single occurrence of<br />

149

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!