Here's an example of CSS:
H1 { color: green }
Selector and declaration
The selector chooses what kind of action for the code to choose from and the declaration sets forth the effect that the action that is chosen.
Declarations have their own breakdown as well
{ color: green }
Property and value
the property tells you what type of an effect is being selected, whether it is the font, alignment, background, or color. The value of the property tells the document what it should look like, if the text should be green, or if the text should be left-aligned, or if the background should be purple. It really gives documents a nice way to customize and stand out.
The chapter from the ebook that really explains CSS makes it clear about what to do, and touches on gluing the CSS into the HTML, which was discussed in last weeks readings. An example of gluing looks like:
<HTML>
<TITLE>Bach's home page</TITLE>
<STYLE>
H1, H2 { color: green }
</STYLE>
<BODY>
<H1>Bach's home page</H1>
<P>Johann Sebastian Bach was a prolific
composer. Among his works are:
<UL>
<LI>the Goldberg Variations
<LI>the Brandenburg Concertos
<LI>the Christmas Oratorio
</UL>
<H2>Historical perspective</H2>
<P>Bach composed in what has been referred to as
the Baroque period.
</BODY>
</HTML>
The other sites were another way to touch up on learning the CSS and even HTML code writing that I enjoyed last week. I think these sites are very beneficial for someone who has never attempted to write code before.
No comments:
Post a Comment