Building Your Website

Similar documents
Html basics Course Outline

Using Dreamweaver CS6

ICT IGCSE Practical Revision Presentation Web Authoring

A TO Z OF WEB HOSTING

Downloads: Google Chrome Browser (Free) - Adobe Brackets (Free) -

HTMLnotesS15.notebook. January 25, 2015

Introduction to using HTML to design webpages

Index. alt, 38, 57 class, 86, 88, 101, 107 href, 24, 51, 57 id, 86 88, 98 overview, 37. src, 37, 57. backend, WordPress, 146, 148

Welcome Please sit on alternating rows. powered by lucid & no.dots.nl/student

Using Dreamweaver CS6

By Ryan Stevenson. Guidebook #2 HTML

Using Dreamweaver CC. 6 Styles in Websites. Exercise 1 Linked Styles vs Embedded Styles

CSS worksheet. JMC 105 Drake University

Using Dreamweaver CC. Logo. 4 Creating a Template. Page Heading. Page content in this area. About Us Gallery Ordering Contact Us Links

Reading 2.2 Cascading Style Sheets

Using CSS in Web Site Design

Web Publishing Basics I

BIM222 Internet Programming

Lab Introduction to Cascading Style Sheets

CSS: The Basics CISC 282 September 20, 2014

Before you begin, make sure you have the images for these exercises saved in the location where you intend to create the Nuklear Family Website.

HTML and CSS: An Introduction

c122jan2714.notebook January 27, 2014

ADDING CSS TO YOUR HTML DOCUMENT. A FEW CSS VALUES (colour, size and the box model)

Taking Fireworks Template and Applying it to Dreamweaver

Introduction to WEB PROGRAMMING

Introduction to HTML

Using Dreamweaver. 6 Styles in Websites. 1. Linked or Imported Stylesheets. 2. Embedded Styles. 3. Inline Styles

Make a Website. A complex guide to building a website through continuing the fundamentals of HTML & CSS. Created by Michael Parekh 1

7300 Warden Avenue, Suite 503 Markham, Ontario Canada L3R 9Z6. Phone: Toll Free: Fax:

Figure 1 Properties panel, HTML mode

1 Creating a simple HTML page

week8 Tommy MacWilliam week8 October 31, 2011

WEBSI TE DESIGNING TRAINING

CSS BASICS. selector { property: value; }

Using Dreamweaver CS6

NEW WEBMASTER HTML & CSS FOR BEGINNERS COURSE SYNOPSIS

Page Layout Using Tables

Assignments (4) Assessment as per Schedule (2)

Designing the Home Page and Creating Additional Pages

HTML Summary. All of the following are containers. Structure. Italics Bold. Line Break. Horizontal Rule. Non-break (hard) space.

This document provides a concise, introductory lesson in HTML formatting.

Cascading style sheets

CREATING A WEBSITE USING CSS. Mrs. Procopio CTEC6 MYP1

Dreamweaver Basics. Planning your website Organize site structure Plan site design & navigation Gather your assets

HTML/XML. HTML Continued Introduction to CSS

Dreamweaver Basics Outline

<body bgcolor=" " fgcolor=" " link=" " vlink=" " alink=" "> These body attributes have now been deprecated, and should not be used in XHTML.

Title: Jan 29 11:03 AM (1 of 23) Note that I have now added color and some alignment to the middle and to the right on this example.

ORB Education Quality Teaching Resources

Introduction to Multimedia. MMP100 Spring 2016 thiserichagan.com/mmp100

Creating A Web Page. Computer Concepts I and II. Sue Norris

To illustrate how to set TAG styles the <body> and <h1> tags (for the BODY and the HEADING 1 styles) will be adjusted.

As we design and build out our HTML pages, there are some basics that we may follow for each page, site, and application.

11. HTML5 and Future Web Application

HTML & CSS November 19, 2014

Introduction to Cascading Style Sheet (CSS)

Basics of Web Design, 3 rd Edition Instructor Materials Chapter 2 Test Bank

Unveiling the Basics of CSS and how it relates to the DataFlex Web Framework

HTML and CSS a further introduction

Review Question 1. Which tag is used to create a link to another page? 1. <p> 2. <li> 3. <a> 4. <em>

Lesson 1 HTML Basics. The Creative Computer Lab. creativecomputerlab.com

In the early days of the Web, designers just had the original 91 HTML tags to work with.

This booklet is knowledge of. a web page. of a web page find what you. you want to. SiteSell offers. Introduction

ITNP43: HTML Lecture 4

Dreamweaver Basics Workshop

Introduction to web development and HTML MGMT 230 LAB

Tutorial. Activities. Code o o. Editor: Notepad Focus : Text manipulation & webpage skeleton. Open Notepad

HTML and CSS COURSE SYLLABUS

Programmazione Web a.a. 2017/2018 HTML5

Class 3 Page 1. Using DW tools to learn CSS. Intro to Web Design using Dreamweaver (VBUS 010) Instructor: Robert Lee

A HTML document has two sections 1) HEAD section and 2) BODY section A HTML file is saved with.html or.htm extension

CS 1100: Web Development: Client Side Coding / Fall 2016 Lab 2: More HTML and CSS

The internet is a worldwide collection of networks that link millions of computers. These links allow the computers to share and send data.

COMP519 Web Programming Lecture 6: Cascading Style Sheets: Part 2 Handouts

Introduction to HTML & CSS. Instructor: Beck Johnson Week 2

AP CS P. Unit 2. Introduction to HTML and CSS

Using AJAX to Easily Integrate Rich Media Elements

2. Write style rules for how you d like certain elements to look.

E , Fall 2007 More with stylesheets

MPT Web Design. Week 1: Introduction to HTML and Web Design

CSC 121 Computers and Scientific Thinking

Creating a CSS driven menu system Part 1

Creating and Building Websites

Using Dreamweaver. 3 Basic Page Editing. Planning. Viewing Different Design Styles

Basic CSS Tips and Tricks

ICT IGCSE Practical Revision Presentation Web Authoring

Using Dreamweaver CC. 3 Basic Page Editing. Planning. Viewing Different Design Styles

Web Programming and Design. MPT Senior Cycle Tutor: Tamara Week 1

recall: a Web page is a text document that contains additional formatting information in the HyperText Markup Language (HTML)

3.1 Introduction. 3.2 Levels of Style Sheets. - HTML is primarily concerned with content, rather than style. - There are three levels of style sheets

Web Structure and Style. MB2030 Section 2 Class 4

How to lay out a web page with CSS

How to create and edit a CSS rule

Introduction to the MODx Manager

Website Development (WEB) Lab Exercises

c122sep814.notebook September 08, 2014 All assignments should be sent to Backup please send a cc to this address

Which is why we ll now be learning how to write in CSS (or cascading sheet style)

Beginning HTML. A tag is a command written between angle brackets (the less than and greater than symbols). Ex. <html>

ATSC Week 2 Web Authoring

Transcription:

Building Your Website HTML & CSS This guide is primarily aimed at people building their first web site and those who have tried in the past but struggled with some of the technical terms and processes. It will not take you from a beginner through to becoming an HTML & CSS guru, there are plenty of resources online to help you do that (see the resources page). What is will do is introduce you to the concepts behind building a web site for you to hopefully grab hold of and run with. icatching Design Ltd www.icatching.co.uk

Deciding how you will build your site Before you can start you will need to choose the software you are going to use to build your web site. Depending on your level of experience and aspirations there are three ways for you to build your website: HTML editor Web building software (aka WYSIWYG) Web builder templates Manually code your site using an HTML editor Hand coding obviously requires at least a basic knowledge of HTML but benefits from being by far the most flexible option. Although slower to get going than the other two methods, the long term benefits include a greater understanding on how web pages are built and the ability to apply that to your own. Examples: Adobe Dreamweaver Microsoft Expression Web Notepad++ (free) Although you will be faced with a blank page when you first start that doesn t mean you have to create everything yourself from scratch. There are so many free resources online (templates, images, scripts...) for you to use that the challenge will be going through them all. Use WYSIWYG software What You See Is What You Get software uses the same principles as a desk top publisher and allows you to build a website pointing and clicking with no coding required. They work by generating the HTML/ CSS in line with your design on screen with the added benefit of letting you then dip in and manually change the code. Examples: Serif WebPlus Evrsoft.com Website builder templates A lot of web hosts provide these with shared hosting accounts or as standalone products. They require no coding knowledge (in fact most don t let you make any manual changes at all). The templates are preset and all you have to do is make some colour/ image selections, add your content and click publish. Although very quick to start and finish and finish a site, the quality of the results are questionable. 1

Getting started with the code When a visitor arrives on your site and the web page is displayed on their browser quite a lot has gone on behind the scenes to make this happen. A couple of terms you may come across are client side coding and server side coding. Client side code (which covers HTML, CSS and JavaScript) is script executed by the user s web browser whereas server side coding (which covers PHP & MySQL, Perl and ASP/ ASP.NET) is script first executed by the server before being shown to the visitor. Client-side A web page has three layers which you build up as the site progresses. First you start with your content (HTML) which is essentially the website s blue print. You then move on to how it looks by adding components such as colour, images and spacing (CSS) and finally you add interactive and behavioural elements to the page (JavaScript). The 3 layers of a web page: 2

Keep them all separate Initially web developers put all of these scripts on to one page however they soon realized how time consuming and labour intensive this approach was, especially when any changes were required. Today best practice using HTML, CSS and JavaScript dictates you use separate files for each. Easier to re-use code across multiple pages or even sites Reduces the amount of duplicate code Easier to find and fix problems Makes a site more accessible (e.g. browsers with JavaScript disabled can still show the HTML/ CSS files) This guide will focus on introducing you to HTML and CSS. File structure A web site is basically a collection of inter connected files kept within directories. Keeping your files well structured and logically named helps you administer the site as it grows and from an Search Engine Optimisation perspective. File structure and SEO Search engine optimisation is the process of increasing a websites organic position in a search engine. Keyword analysis is a major part of a search engine s ranking factors, be it in the domain name, the <title> tag, in the text etc. This also goes for your file names which makeup the page s URL. Bad: http://www.super-sport.com/range2/catgeorty4.html Good: http://www.super-sport.com/trainers/basketball Below is an example of a typical file structure for a site. Index (the home page), about, FAQs and products are all in the parent directory. Apples, Oranges and Pears are in the Products directory and conference pears and dessert pears are in the Pears directory: - Index - About - FAQs - Products + Apples + Oranges + Pears ++ Conference Pears ++ Dessert Pears 3

If I wanted to link to the About page I would do the following <a href= /about >Text goes here</a> If I wanted to link to the Oranges page I would do the following <a href=.../products/oranges >Text goes here</a> If I wanted to link to the Dessert Pears page I would do the following <a href=.../products/pears/dessert pears >Text goes here</a> A basic HTML page To get started and have a play you can copy and paste this code in to your HTML editor: <html> <body> <h1> Here is my first title </h1> <p>this is my first para graph to help me test different types of styles using CSS with my HTML</p> <h2>this is my second title</h2> <p>here is a second paragraph to see how I can have different styles for the same tag on the same page </p> <ol> <li>list item 1</li> <li>list item 2</li> <li>list item 3</li> <li>list item 4</li> </ol> </body> </html> Save the file as index.html (this is the name web browsers and search engines want to see so they know which page is the home page) What do they mean? <html> Tells the web browser to expect an HTML file <body> Tells it that the main body of the page is coming. Important: Every HTML web page must have those two tags (opened and closed). <h1> The biggest heading <h2> The 2 nd biggest heading <p> A paragraph <ol> An ordered list (e.g. 1,2,3 etc) <li> A list item for the ordered list <a href=... > Creates a link. 4

What is CSS? Cascading Style Sheets are the second layer of a web page and deal with the presentational side of the page (page layout, font size, font colour, margins, padding, images...). In the same vain as discussed above, there are a couple of approaches to using CSS; placing the CSS in the HTML file or using an external CSS file. Why use an external CSS file? Quicker page load times Share the same file across multiple pages One update applies to all those pages Style.css Index.html About.html FAQ.html This guide will focus on implementing CSS to your site using an external CSS file 5

Creating your external CSS file CSS syntax is made up of three parts: Selector { Property: Value; Although it may seem complicated at first, once you get started it will all fall in to place. All this means is that for each element (e.g. <p>) you determine how a certain aspect of it (e.g. the font) should be presented (e.g. Arial). For example: P { Font - family: Arial; h1 { Font - size: 14pt; Color: red; li { list - style: disc; margin - left: 10px; Here I have stated that any text within a <p> tag should be displayed using the Arial font, my <h1> headers should be 14pt and red, and any bullet lists items (<li>) should use a filled in circle (called a disc ) and there should be a 10px margin to the left. Note: Your CSS won t work without the curly brackets and a semi-colon to separate the properties and their values, so don t forget to add them 6

Two paragraphs, two styles In the example code above we have two paragraphs and at the moment they have the same attributes. To mix things up we can give them different styles. We do this using the class selector. In your CSS file we state that it is a class by using a full stop and naming the class whatever you want. It is best to describe what the class does rather than what is currently is as this may change in time. E.g. name it highlight rather than green, as in the future you may want to use the colour red..highlight { color: green; Now when we want to highlight any text we can apply it to the HTML like this... <html> <body> <h1> Here is my first title </h1> <p> This is my first paragraph to help me test different types of styles using CSS with my HTML</p> <h2>this is my second title</h2> <p class= highlight > Here is a second paragraph to see how I can have different styles for the same tag on the same page </p> <ol> <li>list item 1</li> <li>list item 2</li> <li>list item 3</li> <li>list item 4</li> </ol> </body> </html> Class Vs id There are two ways of specifying and naming attributes; class and id. The difference between the two is the id must be unique within the HTML document and a class can be used as many times as you want. To create an id use a hash: #highlight { color: green; 7

Quick tips: You can group your selectors if you want them to carry a common value. A good example is styling the colour of your headers. h1, h2, h3, h4 { Color: green; Here the <h1> to <h4> tags will all be the same colour (green). If you want the same property throughout the page without having to specify it for every selector (e.g. set the page s default font) use body : body { font - family: verdana; You can style pretty much everything and anything on your site and the best way to l earn is to get stuck in and have a play. Once you have created your style sheet save your file as something along the lines of style.css. How to link to an external CSS To let the web browser know which style sheet to reference for this page, in between the <head> tags place the following line (changing the highlighted file name to your own). <link rel="stylesheet" type="text/css" href=" style.css " /> The <head> tags should be opened after <html> and closed before <body>. Using the same example as before we now get the following HTML: <html> <head> <link rel="stylesheet" type="text/css" href="style.css" /> </head> <body> <h1> Here is my first title </h1> 8

Keeping your code clean Well laid out and commented HTML and CSS files really pay off further down the line when you need to make changes or review the impact of a change on other areas of the site. Indented HTML Indenting your HTML helps to keep your HTML neat and easy to review quickly when you cast your eye over it. <div id= example > <ol> <li>text 1</li> <li>text 2</li> <li>text 3</li> </ol> </div> A quick note about <div> The <div> tag is used to group sections of an HTML file and format them with common styles. This can be anything as basic as the font used all the way up to determining the layout of the entire page. Within the CSS file you use these in exactly the same way as when we discussed the Class and id selectors previously. Nesting Good practise dictates you should nest tags within other tags so that they maintain the same order by which they were opened. <p><strong><em>text goes here</em></strong></p> <strong> is used to make a font bold. <em>is used to apply italics Commenting It is easy to make a change and forget about what it does or why you did it in the following weeks or months. Also, once a file become particularly large where elements such as a div starts and ends or what an id or div in your CSS actually does can get confusing. Comments are never shown on the web page. They can follow two formats: HTML: A comment in your HTML file is started and ended with <!--... --> <p>text goes here<p/> <! -- Comment no one will see but me -- > CSS: A comment in your CSS file is started and ended with /*...*/ h1 { font - size: 16pt /*Comment no one will see but me*/ 9

The example below shows how, without a comment, you would have to scroll up and down the page to work out which div was associated with the ordered list. <div id= list > <-- List div starts here -- > <ol> <li>text 1</li> <li>text 2</li> <li>text 3</li> <li>text 4</li> <li>text 5</li> <li>text 6</li> </ol> </div> <-- List div ends here -- > </div> <-- Left - body div ends here -- > </div> <-- Wra pper div ends here -- > Uploading your site s files Once you are ready to see what your website looks like online, uploading the files to your web space is really easy and is often as simple as clicking, dragging and dropping. The method you will use to get your website online is called File Transfer Protocol (FTP). Don t be put off by the name, all this does is take the files from your computer and put them on to the web host s server for people to access. Simple! In order to do this your web host may offer an upload function though your account with them, but that means you have to log in every time. A quicker alternative that most people use is FTP software. Some HTML editors come with this built in (e.g. Dreamweaver & Microsoft Expression Web) but even if yours doesn t there is the industry standard stand alone (which is free) to download called FileZilla 10

Free resources/ links HTML editors http://notepad-plus.sourceforge.net/uk/site.htm http://www.coffeecup.com/free-editor/ Learning resources http://www.w3schools.com http://htmldog.com/ Free web site templates http://www.free-css.com/ http://www.freecsstemplates.org/ http://www.opendesigns.org/ Free images http://www.freefoto.com http://www.sxc.hu/ Colour guide http://html-color-codes.com/ CSS galleries http://www.cssdrive.com/ http://www.csselite.com/ Firefox plug-in Firebug: https://addons.mozilla.org/en-us/firefox/addon/1843 MeasureIt: https://addons.mozilla.org/en-us/firefox/addon/539 Web Developer: https://addons.mozilla.org/en-us/firefox/addon/60 11

Common HTML tags Tag What it does Example <a> Anchor text <a href=www.example.com>text here</a> <br /> Line break <p>text goes here <br /> this line now is underneath</p> <div> Specifies a section within the HTML doc <div id= highlight > <em> Emphasises the text e.g. Italics <p>some text goes here and we want to <em>emphasise this</em></p> <h1 h6> Header <h1>page title here</h1> <li> List item <ol> <li>list item</li> </ol> <ol> Ordered list See <li> example above <ul> Unordered list (bullets) <ul> <li>list item</li> </ul> <p> Paragraph <p>text goes here</p> <strong> Strong text e.g. bold <p>some text goes here and this text <strong>is bold</strong></p> <table> Start of a table See below <td> Cell of a table See below <th> Header cell of a table See below <tr> Table row of a table See below Table example: <table> <tr> <th>genre</th> <th>band</th> </tr> <tr> <td>pop</td> <td>spice Girls</td> </tr> </table> 12