Exercise 2 - styles
Example of using styles on div objects
Three block objects,
without styles applied:
block one content
block two content
block three content
Three block objects,
with inline styles applied:
block one content
block two content
block three content
Two black elements
arranged side by side in a third block - using inline css:
left block content
right block content
Example of styles applied inline for each single objects
Example of styles defined in head section of the html file
Example of styles defined in the external file, linked to the script in a head section (2 files)
Script file (html)
Styles file (style.css)
Exercise
________
Use div elements to create a chessboard like the one showed below.
- Prepare CSS style for white and black block.
- Assign style to the objects.
You may also try to extend your work with columns and rows like on the picture below: