3 - Bootstrap
HTML/CSS Frameworks
A design framework is a collection of re-usable code snippets which you can use to build a website. It is sometimes called a "design system", "style guide", or "pattern library", and will usually consist of three things:
Brand guidelines define the appropriate typography, colors and logos to use.
Components define re-usable code snippets for common requirements, like navigation menus.
Helpers define additional code tools to construct the site, like layout grids.
The main goals of a design framework are to ensure design consistency and avoid writing the same code twice.
Bootstrap 4
Bootstrap is CSS and JavaScript code that we load in our HTML pages. Bootstrap's documentation describes how to write HTML code that fits the Bootstrap components, including a grid layout as well as several components.
Exercise (15 minutes)
Fork this repository and follow the instructions in the readme to create a new page and add a card component to it.
Assignment
Note: Ignore any ads, icons, and interactive elements (which use Javascript). If you really want to grab icons, try taking a screenshot of them and making an image file out of that.
Go to newsweek.com and have a look around.
Set up a GitHub repository for this project.
Create a new HTML document.
Think about all the elements on the page and how they are grouped together.
Add Bootstrap to your project by following the instructions at GetBootstrap.com. Use the examples on that page as templates for how to organize your page.
Lay out the basic structure of the page using empty semantic HTML elements that are appropriately sized and which are positioned by using the appropriate Bootstrap classes.
Set up the top title and navigation bar.
Work your way down the page by filling in and positioning the additional sections.
Try resizing the browser to see if it mimics the behavior of the real Newsweek homepage.
Push your solution to GitHub.
Personal Website Project
Over the last two weeks, you've been building personal websites as part of your homework. Now we want you to take those websites and apply the knowledge you've learned to make them as good as you can. Some ideas:
Add Bootstrap 4 to your site and use some of the components.
Use re-usable class names to reduce your CSS code.
Validate your HTML code to find and fix problems.
Add a second page and link to it from your first page.
Try to style the first article differently so that it stands out from the rest.
By the end, you should have created a repository for your site on GitHub with all the commits you've made.
Resources
HTML Forms at Marksheet.io
Building Forms at ShayHowe.com
Last updated