This is an old revision of the document!
<h1 style="font-family:arial, sans-serif; color: green; font-size: 1.7em; text-decoration: underline; font-variant:small-caps; text-shadow:2px 2px #ff0000;"> My Story </h1> <p style="text-align:right"> My friend Pablo has a <em style="color:red; font-weight:700">pet dog</em> called Sam who likes to have his tummy scratched. When they go to the park, <strong>he likes to chase a <em>ball</em>.</strong> He rolls in the dirt so Pablo has to wash him when they get home. </p> <p style="text-indent:50px"> On Sundays they drive to the <sup>mountains</sup> where he runs around smelling the grass and <span style="color:blue;">wagging his tail</span>. He gets so tired that he sleeps all the way home. </p>
p { color: blue; }
{}
) shows the target - what the rules will be applied to.color: blue;
, add text-indent: 50px;
so your CSS looks like this.p { color: blue; text-indent: 50px; }
right
, and the default is left. You can also use center
, but today, let's try justify
. This aligns both the left and the right ends of the text as you see in books.text-align: justify;
;
) or ask for help.span
italic using the following code.span { font-style: italic; }
<span>
tags are now italicised.h1 { font-family: Arial, sans-serif; }
font-size: 3em;
h1 { font-family: Arial, sans-serif; font-size: 3em; text-decoration: underline; font-variant: small-caps; line-height: 3em; text-shadow:2px 2px #ff0000; }