style element

Example 3.29 - style element - Example 3.29 (Without Styles)

 <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cras sollicitudin, orci nec facilisis vehicula, neque urna porta risus, ut sagittis enim velit at orci. Fusce velit. Integer sapien enim, rhoncus vitae, cursus non, commodo vitae, felis. Nulla convallis ante sit amet urna. Maecenas condimentum hendrerit turpis.
 </p>

In style element (<style>) within head element:

p {
    color: black;
    background-color: teal;
    padding: 1em;
    font-family: helvetica, sans-serif;
    text-align: justify;
    margin: 2em;
  }
 

Screenshot

So the full page looks like:


 <html>
   <head>
     <title>CSCIE-12 CSS Example</title>
     <style>
      p {
         color: black;
         background-color: teal;
         padding: 1em;
         font-family: helvetica, sans-serif;
         text-align: justify;
         margin: 2em;
      }
     </style>
   </head>
   <body>
     <p>
      Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cras sollicitudin, orci nec
      facilisis vehicula, neque urna porta risus, ut sagittis enim velit at orci. Fusce velit.
      Integer sapien enim, rhoncus vitae, cursus non, commodo vitae, felis. Nulla convallis ante
      sit amet urna. Maecenas condimentum hendrerit turpis.
     </p>
  </body>
</html>