Practice 8
For this practice exercise, we are going to create a little 2-page website :)
You can see a completed example here:
In your "8" folder, create an
index.htmlfile with the HTML for a layout. And create astyle.cssfile with the CSS for a responsive layout.Feel free to reuse HTML and CSS code from a previous exercise.
Create a table of data within the
mainelement ofindex.html.Use at least 3 columns and 5 rows.
Provide some type of data. It could by anything that would make sense in a table—even something that you make up.
Use the
caption,th,thead,tfoot, andtbodyelements.In the
tfoot, provide a source for your data. It doesn't have to be real. You could just make up something.Style your table in some way with CSS. For example, you could give table rows background-colors.
Create a second HTML file named
list.htmlwith the same layout as used forindex.html. This will be the second page of our little website.You could simply copy the HTML code from
index.html, paste the code intolist.html, and remove the table from themainelement.At this point, you should have 2 HTML files and 1 CSS file.
In the
mainelement oflist.html, create a list of at least 10 list items. This could be a<ul>or<ol>.Use
list-styleorlist-style-typeorlist-style-imageorbackground-imagein your CSS file to change the bullets for these list items.Nest a
<ul>or<ol>element within one of your<li>elements.Use a descendant selector in the CSS to style the nested list items differently. Just an example:
.felafels ul li {
color: #FFBDC0;
font-weight: bold;
}Or without a class added to the
ulelement:main ul ul li {
color: #FFBDC0;
font-weight: bold;
}Add the following HTML code somewhere within the body of both
index.htmlandlist.html:<nav>
<ul>
<li><a href="index.html">Table</a></li>
<li><a href="list.html">List</a></li>
</ul>
</nav>Test the links and make sure they work, allowing you to navigate back and forth between the 2 pages of your website.
Push your changes to your Github repository.
You can see a completed example here: