Tuesday, 13 March 2012

It's in the code

We started to learn coding, what we done may not seem fantastic to anybody who knows about coding but we all have to start somewhere. I not sure if I can tell all that I have been told but I can explain some of the things I have learnt.
First code work
 
The !DOCTYPE html tells the browsers that the coding is html. The next line is html lang=en the denote the default language is English. meta charset=”utf-8” it is using charterer set utf 8. All of this information is in an area called the header. It is unseen on screen and is only there to help the browser. Each line of code has an open tag <> and a closing tag </> the closing tag denoted by the forward slash. As we can see in the head tag <head> opening tag, </head> closing tag.

The second area of coding is the body, which contains headings <h1> and paragraphs <p> and unordered list <ul> as well as the list it self <li> . There are also a link to other pages denoted by the <href=” “> . As you can see from the coding that includes a page called “picture” and one called “video”.
Page display from code
Normal this page would display with a white background and with black text. However we have introduce another element in this web page and that is the use of a style sheet. This is a supplementary coding that give style to elements on the page and can be applied to all pages in one simple piece of coding. 
Style sheet code
The web page when read by the browser read from the top to the bottom and follows instructions as they are given. Line 7 indicates that there is a style sheet and where it can be found. The browser reads the style sheet and applies it to the coding, it then reads on after line 7. It applies these styles unless otherwise instructed to do so. Briefly it say to the body apply this criteria: “ background color powder blue”, “text to be gold”, use the font family Helvetica neue if you can't find that font on the browser use Arial, if you can't find that font use Helvetica and on to the next choice. For headings 1 <h1> and headings 2 <h2> use Georgia, if not the others in the list. For the list style character I have chosen Katakana iroha just to display some thing completely different so it stands out and helps me understand the process. After writing this I am a little clearer about coding.
 

 


No comments:

Post a Comment