header2000

Section 3 Website Design Skills

Section 3 Website Design Skills - includes six lessons on designing the web pages for your business website.

Lesson 2.7 Design Your Business Website

Lesson 2.8 How to Add Links to Web Pages

Lesson 2.9 Create an Internal Style Sheet

Lesson 2.10 Create an External Style Sheet

Lesson 2.11 Page Layout with CSS Grid

Lesson 2.12 How to Make a Menu with CSS Grid

In our final lesson for Course 2, we add three more pages to our website and then use CSS Grid to create a horizontal menu linking all of our web pages together into a complete business website.

Step 1: Create an About Us Web Page
Open Bluefish and add a new file using the HTML 5 template. Add the following between the body tags:

<h2> This is our Story</h2>

<p>We will eventually write a story on this web page explaining who we are and why we started our new business</p>

Save the file in your business website folder as about-us.html.

Step 2: Create a Contact Us Web Page
Add another new file using the HTML 5 template. Add the following between the body tags:

<h2> How to Contact Us</h2>

<p>We will eventually add our business Gmail address and/or other information explaining how folks can contact us. </p>

Save the file in your business website folder as contact-us.html.

Step 3: Create a Support Our Business Web Page
Add another new file using the HTML 5 template. Add the following between the body tags:

<h2> How to Help Our Business Grow</h2>

<p>We will eventually add information about how folks who like our business idea and want to help us can contribute to our business. </p>

Save the file in your business website folder as support-us.html.

In this lesson, we will use a new Page Layout tool called CSS Grid to quickly and easily create any page layout you can dream of:

01

Best of all, this tool can be used to create a series of “Responsive” grids that display well on any device used by viewers to access your business website.

Why do we need CSS Grid?

Previously, we learned that we can create colorful boxes on web pages by using the divide tag. One problem with these boxes in the past was that they might not display well on different widths of screens. A web page might look good on a laptop but look bad on a mobile phone or a tablet. What was needed was a way to automatically adjust the width of a series of boxes of content to fit the width of whatever screen it was being displayed on. Recently a new method was developed called CSS Grid to make it much easier for us as web page designers to lay out boxes of content that respond to the width of any given viewing screen.

Our plan will be to first set up a one column layout for narrow screen devices like mobile phones. We will then create a second layout for wider screen devices like tablets and laptops. We will then set up a third layout for very wide screens used with desktop computers.

Our primary goal is to make sure that the main content area of the web page is readable. This means that the lines of text in the main content area should be at least 500 pixels wide but no wider that 800 pixels – as really wide screens have too many words in a line making the text very hard to read. As one example, an 8 ½ inch wide sheet of paper with one inch margins has a column width of 6 ½ inches. As one inch is about 100 pixels, then 6 ½ inches is about 650 pixels. This is a page width most people are used to reading.

We will accomplish this goal by using a single column layout up to 750 pixels in width. We will then change to a two column layout with a 500 pixel main content area and a 250 pixel side bar. Both boxes will expand at this 2 to 1 ratio until the screen width is 1200 pixels – making the main content 800 pixels and the side bar 400 pixels. We will then change to a three column layout where the main content is 600 pixels and both side bars are 300 pixels. This will expand to a maximum width of 1600 pixels where the main content will again be 800 pixels and both side bars will be 400 pixels.

Below are the steps to achieve these three layouts:

In the previous section, we created an internal style sheet by copying inline attributes and then pasting them into the head of our document. In this section, we will use our internal style sheet we just made to create an external style sheet. We will then place our style sheet into our website css folder and then provide a link the style sheet in the head of our web documents.

Click File New to create a new document with Bluefish. Delete the default code. Then copy and paste the internal style sheet into this blank document. Here is what it will look like:

01

Now delete the opening and closing style brackets. Here is what it now looks like:

02

 

Then click File, Save As and navigate to your website CSS folder. Name the file mycss.css. Then click Save.

03

 

CSS Styles are a set of rules to control the appearance of various elements of our website. CSS styles are independent of our content. Thus, one style sheet can not only be used for several web pages within a single website but also used to control the appearance of several websites. In this lesson, we will use the Bluefish Editor to build a CSS Style Sheet. We will then review web font options and use our new style sheet to modify the appearance of our web fonts.

Here is a diagram of CSS syntax. Note that colons are used at the end of each property while semi-colons are used at the end of each value:

01

 

How to Create an Internal Style Sheet

There are two ways to move CSS styles outside of the body of our HTML document. These are to create an Internal Style Sheet or an External Style Sheet. We will first learn how to create an Internal Style sheet since it is a little easier.

What are Links (also known as Hyperlinks)?

When you go on the Internet you can easily go from one web page to another by clicking on a link on one page which then takes you to another page. The Internet is like a huge library of billions of hyperlinked documents. Links provide the bridges to travel between web pages. Even search engines are nothing more than a series of related links.

We use links to move between the pages of our websites too. It is therefore important to take the time to learn how hyperlinks work and then make the effort to add both internal and external links to your web pages.

01

The Link or Hyperlink element is also called the Anchor element. This is why this element begins with the letter A. The anchor element uses an attribute called the Href Attribute. Href stands for the Hyperlink reference.

Once again, we will use the Bluefish Web Editor to help us learn the syntax for anchors and links.

Open your My First Website folder and right click on index.html to open it with Bluefish. Next, put your cursor right after the last closing paragraph tag. Then press Enter on your keyboard to create a new blank line. Type into this line a left angle bracket followed by the letter p. Press Enter to enter the paragraph tag pair. The place your cursor between the tags and type: This is my first link!

Finally, select the word link and then click on the Standard Tab in the Bluefish tool bar. Then click on the black Anchor icon to bring up the Quick Anchor Wizard. Wizards are forms offered by Bluefish that you fill out to insert things like links and images into your web pages.

The first step in designing your business website pages is to divide the web pages into a series of sections called Divides.

How to Create a Divide
So far, the only tags we have used on our index.html file have been the paragraph tag, the heading tag and the image tag. We are now going to add the divide tag – also called the div tag. The divide tag is used to divide a page up into sections. Each section can have its own heading and paragraph tags. The divide tag pair looks like this:

<div></div>.

The divide tag is similar to the paragraph tag in that it is a block element – meaning that it forms a new line – as opposed to an inline element, like the span tag or anchor (link) tag, that does not form a new line.

One use of a divide tag is to create an independent section of the website that has its own style and appearance. CSS is used to create this style.

There is also something called the Box Model that is used to style divides.

01

The box model starts with visible content such as text and images that is surrounded by invisible padding which in turn is surrounded by a visible border which in turn is surrounded by an invisible margin. The box has four sides called top, right, bottom and left.