Step 5
- Let's change the presentation of content by aligning to center! Add the following
styleattribute to the<body>tag.
<body style="text-align: center;">
- We can further change the text and background colors.
<body style="text-align: center;
color: aliceblue;
background-color: darkblue;
>
-
Save the
index.htmlfile; refresh theindexpage in the browser. Notice the changes to the presentation of content. -
The browser is able to interpret colors
aliceblueanddarkblue. Now try the following:
<body style="text-align: center;
color: #7FDBFF;
background-color: #001f3f;"
>
#7FDBFFand#001f3fare hexadecimal values representing colors. I selected these by inspecting the elements on sleepyti.me website. This sort of inspection can be done using your browser's developer tools. You can also use various HTML color picker tools for such purposes.