Tuesday, 27 June 2017


LO1; UNDERSTAND THE FUNDAMENTAL OF CASCADING STYLE SHEETS
UNIT 20 P1; EXPLAIN HOW HTML FILES ACCESS CSS
UNIT 20 M1; ASSESS DIFFERENT IMPLEMENTATION STYLE OF CSS

P1
INTRODUCTION


For this task, I have been asked to explain how HTML files access CSS. Within this blog, I will be talking about a variety of things such as; HTML and CSS and their purpose in the development of websites then I will be making a comparison and will contrast as to how HTML and CSS work together in the development of websites.
HTML:
HTML also known as Hypertext Mark-up language is used to structure websites which can contain a variety of things such as; symbols and codes that are used to create a web page. An example of the symbols used are, <h1> and <p>. The <h1> tag is used for headings on a web page which then can be formatted with CSS.  The <p> tag is used to define a paragraph. Some of the tags come as pairs meaning that <p> goes at the start of the paragraph and </p> goes at the end of the paragraph to show that the paragraph has finished.



The purposes of HTML is to describe the web page and information so the internet browser can display what the code reads in a graphical form. The tags and code are used to create the layout and structure of the web page that is being created.

The main three tags that used in HTML are as follows;


  • <html> - is to create the beginning of the HTML.
  • <head> - is used for other elements to be used within the <head>.
  • <body> -  is used for the content of the web page.


CSS:
Cascading Style Sheets is a language that is used to set the style of a web page. Also, when a web designer creates a web page they are able to use three different CSS implementation styles which are inline, internal and external. CSS formats the structure and the layout of the entire web page.



If you use external Cascading Style Sheets it can format multiple web pages at once. If you needed to change the colour scheme on the web page you will be able to do so once on the Cascading Style Sheet.


An example for CSS being used in HTML are as follows;
If you named your style sheet “learnstyle.css” you will then have to make sure that in the HTML file where it says “<link rel="stylesheet" href="style.css">”, you will have to change the section where it says “style.css” to “learnstyle.css”. If you do not change the text, then the HTML and CSS will not link together so it will create a blank web page.



COMPARISON/CONTRAST:
HTML is used to create the layout and the structure on the web page. Whereas the Cascading Style Sheet is used for things such as; the fonts size, font style, font family, the background colours and positioning. Which both HTML and CSS and linked to create a functioning web page. It is best to use an external Cascading Style Sheet as you are able to change multiple formats at once. For example, if you wanted to change the font size all you have to do is change it once and then it will change all of the text on the webpage to the same size.



Reference:




M1
INTRODUCTION

For this task, I have been asked to assess different implementations styles of CSS. Within this document, I will be talking about a variety of things such as; the descriptions, advantages and disadvantages of inline, internal, and external CSS embedding. This will be as follows;

There are three different ways of implementing CSS code, these are as follows:-
  • Inline
  • Internal
  • External

Inline; is when you can add the style attribute to each individual HTML element. What this means is that if you wanted to change something specific on a specific web page such as the background colour then all you should do is go to the section for that specific web page and find the where is says “background-color: blue;”.
An example of inline is as follows;
<h1 style=”color:blue;margin-left:30px;”>This is my heading.</h1>
The example above shows that the heading of the web page is the colour blue, with the margin to the left hand side, at the size of 30px. Where it says "This is my heading", the colour, the margin and the size will apply to it. 
There are advantages and disadvantages of inline. First of all, the advantages of inline can be if you wanted to test one element on a web page, you can make a quick change to the background colour to see if the background colour works as part of the design. A disadvantage of inline is that it can be very time consuming. For example, if the client does not like the colour scheme of their web page, that is 15 web pages long and there are 10 headings per page, then the web designer will have to change the colour scheme on every heading on every web page.  


Internal; is when you do all the coding on the same page. which is within the div tags. Internal Cascading Style Sheet is better for you to use if you are only creating a one-page web page. When creating the web page as well doing the code on the same page you will have to use a tag called <style>.  An example of internal can be:-

<head>
<style>
h1{
color:pink}
</style>
</head>

The example above shows that if you want to change the colour of the headings to pink, and you have a 50 page web page, you will have to change the colour of the heading a multiple of times. 

There are advantages and disadvantages of using internal CSS. The advantages of internal coding is if you are a beginner in creating a web page, it is best to start of small then work your way up to make a bigger and better web page. Another advantage of internal can be that the web designer is able to test to see if the HTML and the code have worked and if they haven’t worked then the web designer is able to make this minor fixes.
A disadvantage of internal embedding is the amount of time it takes for the HTML to load onto the internet browser, in which this can make the user frustrated as it shouldn’t take that long to load. Another disadvantage of using internal can be that the page size gets larger than normal this is because it can help beginners who are creating their first ever web page.


The main disadvantage of internal CSS is that it can be very time consuming. The reason for this is because if you have a 50 page web page, and you wanted to change the font-family, you will have to change it 50 times as there are 50 pages.
External; is when you create a style sheet outside of the HTML page. By creating an external style sheet which automatically links to the HTML page, you can make the one CSS page apply to many web pages. When you have opened up the external style sheet,  there is  already code showing that the external style sheet and the HTML are linked together. An example of this could be, if you wanted to change the size of the content of the web page, from 14px to 28px then you have to only change it once, which then will change it globally. After you have saved the changes to the coding then you will see that the font size on the entire web page has changed.

An advantage of external embedding is that the web designer has full control of all of the web pages that are being used to create the website. If the client doesn’t like something specific on the website, then all the web designer has to do is change that specific thing once and it will change it on every web page that is being used for the website.  Another advantage of external embedding is that it takes less loading time when going through to the internet browser. The best internet browser to load the web pages onto is Google Chrome as it is one of the fastest browsers to load.

A disadvantage of external style sheet is that it can take a long time to load onto the internet browser the first time around as the Cascading Style Sheet has to be downloaded.
An example of code used to link to an external stylesheet is as follows.

<head>
<link rel=”stylesheet” type=”text/css” href=”mystyle.css”>
</head>

Reference:


https://vineetgupta22.wordpress.com/2011/07/09/inline-vs-internal-vs-external-css/

Assignment 3; U20P4, U28P4, U08M3 & U20M3


UNIT 20 LEARNING OUTCOME; BE ABLE TO CREATE INTERACTIVE WEB PAGES
P4; DESIGN WEB PAGES USING CSS TO CONTROL LAYOUT
M3; EMPLOY GOOD PRACTICE IN THE DESIGN AND IMPLEMENTATION OF WEB PAGES

UNIT 28 LEARNING OUTCOME; BE ABLE TO DESIGN WEBSITES
P4; USING APPROPRIATE DESIGN TOOLS, DESIGN AN INTERACTIVE WEBSITE TO MEET CLIENT NEEDS

UNIT 8 LEARNING OUTCOME; BE ABLE TO PLAN E-COMMERCE STRATEGIES
M3; DESIGN AN INTERFACE FOR AN E-COMMERCE BUSINESS
INTRODUCTION:
For this task I have been asked to design web pages using CSS to control layout. I will be talking about a variety of topics such as the following;
Purpose of website:
The purpose of the website that I am creating is to make an interactive and functional website about different types of rabbits. Also with the website that I am creating, one of the web pages will be an e-commerce web page which is named as ‘shop’ as I have to sell and promote the products that can be sold for rabbits, and what rabbits need.
Target audience:
The target audience for the website that I am creating is for pet owners. The reason for my target audience being for pet owners is because it is best that people that have rabbit or planning to have a rabbit are aware of the different types of rabbits, how they should be cared for and what types of foods that they can eat. If people are planning on getting a rabbit then this website would be the ideal site that gives them information about rabbits.
Adobe color CC: white(#ffffff), grey (#b3b3b3) and pink (#ff66b3)
Google web fonts: Arsenal, san serif; Lobster, cursive; Vollkom, serif;
Logo: Photoshop – all about rabbits

Site map: draw.io – google one drive

Design: draw.io - google one drive
All of the webpages in the website consist of three main sections which are the main content, other content and in the top right hand corner is where an image can be placed. Except the shop webpage has eight individual images on. They all have a simple structure and layout so that when pet owners have a clear and easy to read the information.
Home webpage - on the home web page there is a variety of information about rabbits including how to take care of a rabbit and what needs to be placed into the rabbits cage or hutch when it needs to be cleaned out.
Baby Rabbits webpage - on this specific webpage it consist of information about baby rabbits when they are born and information about when they start to grow.
Dwarf rabbit webpage - on this specific webpage consist of information about dwarf rabbits and why they are called dwarf rabbits.
Food Rabbits Eat webpage - on this specific webpage it consists of the different types of fruit and vegetables a rabbit can have as they contain protein. Where as some vegetables the rabbits cannot have a lot of as they have a lot of sugar in.
Shop webpage - on this specific webpage of this website has different items and products that a rabbit needs within their cage, what rabbit food they can have. Also including the prices for each item.

 


























Images used in website:
I have chosen multiple images within my website. Which there is one on each individual webpage. The images that I have chosen for my website about rabbits are related to each individual webpage. for example; I have chosen an image of a rabbit eating carrots so this image has been placed on the webpage called "Food Rabbits Eat".

On the home webpage, I have chosen and image of a rabbit jumping in mid air. The reason for this is it is the welcome page and I wanted to make the pet owners and readers to be engaged in the website about the rabbits.

On the baby rabbits webpage, I have chosen an image a baby rabbit when it has fur. The reason for this is because the image, the webpage and the information all relate together. It will give the pet owner and readers an idea of what baby rabbits look like.

On the dwarf rabbit webpage, I have chosen an image of a dwarf rabbit. The reason for this is because the image relates and makes the warm welcome of the webpage about dwarf rabbits and how small they can be.

On the shop webpage, I have got eight individual images of the different items that are needed to look after any type of rabbit, in-door or outdoor rabbits. The reason for this is because I have created an e-commerce page that will allow customers and pet owners to purchase products from the All About Rabbits website.































Assignment 2; U20P2, U20M1, U20P3, U20M2, U28M2

LO2; UNDERSTAND THE FUNDAMENTALS OF A SCRIPTING LANGUAGE
UNIT 20 P3: EXPLAIN THE FUNDAMENTALS OF A SCRIPTING LANGUAGE


INTRODUCTION:
For this task I have been asked to explain the fundamentals of a scripting language. Within this section of this document will be a variety of information about JavaScript and JQuery. Both JavaScript and JQuery are not programming languages, JavaScript is a scripting language and JQuery is a library.

What is a scripting language?
A scripting language is a programming language that supports scripts. It also interprets and executes one command at a time, and in JavaScript's case interpreted by the internet browser. There are a wide range of scripting languages that are used. But the main scripting language that is used in web development is JavaScript, which will be spoken about below.

JAVASCRIPT


JavaScript is a scripting language that is used for websites and it is also compatible with most internet browsers, for example; Internet Explorer, Firefox and Google Chrome. Many people think that Java is shortened from JavaScript, but they are two different languages. Java is a programming language whereas JavaScript is a scripting language. JavaScript and Java share a variety of features, for example; if statements, variables and many more others. JavaScript and Java share similar controls, such as; variables (must be identified and declared),  adding functionality and communicating with the client side.

The difference between JavaScript and Java is, Java creates applications that run in a virtual machine or browser, whereas JavaScript code is run on the internet browser only.

JavaScript is mainly used on the client side which is then through the internet browser, in which is also used with a combination of CSS and HTML. Some scripting languages require a plug in, whereas JavaScript does not require a plug in. The reason for this is because most internet browsers are compatible with JavaScript.

<!DOCTYPE html>

<html>
<head>
<title>JS3</title>
<script>
function changeHTML()
{
document.getElementById("Nicole").innerHTML = "Paragraph has been changed";

var aname= prompt("Enter your first name");
var anum = prompt("What is your favourite food");

}
</script>
</head>
<body>
<div id="Nicole" onclick="changeHTML();">Text on the page</div>
</body>
</html>


This code allows the users to input information such as their first name (Nicole) and what is their favourite food (chicken). This questions will only be asked when the user is looking at the website on the internet. After they have answered the questions, the user will be able to navigate around the website.

JQUERY;


The purpose of  JQuery is to make it easier for JavaScript to create a website.  JQuery is a JavaScript library that holds a variety of features and functions.

JQuery is a library that makes the creation of a piece of code in JavaScript easier. Adding pre-existing functions and features to make it easier to use JavaScript. The reason for this is because JavaScript is case sensitive and will not work if they are not done efficiently, and offers a series of pre determined functions that allow for the user to use JavaScript more effectively such as getElementByID.

https://www.w3schools.com/jquery/jquery_intro.asp