Monday, 19 May 2014

CSS

CSS is a type of coding that works alongside of HTML. The code allows the web browser to reference from another document to make the HTML document shorter. CSS is mainly used to create the visuals of a webpage such as, the positions of the content on the page, the font such as font size, font colour and what type of font you would like. CSS and HTML is also written in American English which can make things confusing when try to understand why the code is not working.  When you use CSS and thing that you use in CSS will overwrite the code that you put into your HTML code. CSS was introduced when people started to realize that the web pages where taking too long to load up because of the web browser having to read every single piece of HTML on the page. CSS aloud websites HMTL codes to be drastically short and then allowed the web pages to load up a lot faster.

Firstly I had to reference my CSS document into my HTML document so this the web browser know where to look when I reference it later in the document. The was put at the top because of HTML reading from top to bottom the code would then read it before it got to the extra CSS codes. The reference code was <link href="myFirstStyleSheet.css" rel="stylesheet" type="text/css">. The next thing I did was start to create my CSS document putting in different type of fonts, font colours and font sizes. In CSS when referring to a colour you can use three different type of code to name them. You can use their name this makes it simple for you in the code but it does mean that you will be limited on to the amount of colours that you will have at your disposal. Because when you name them in the code you can and shades of certain colour and only a distinct one. The next way to name you colour is by using a hex chart, This in my opinion is the best way to select colours because there are not many to remember and also the colours are very much varied. Finally you can select you colour by using RGB, RBG stand for Red, Greed and Blue.  you use this you have to put in the value for each of the amounts on Red, green or blue you want in that colour so if you wanted black you would simple put 0-0-0 because there is simple not colour in black at all. To get back on track I then referenced my CSS document in my HTML document to change a titles colour and to red and make it have a bigger front. In the CSS document I put in a code that would make it so if there was a ling on my webpage if it was clicked then the link would change a different colour so that the viewer on my webpage knew that they had visited it.  Finally on the CCS document I made it so the margin of the web page was brought in 15% more. I then added in a code that would allow me you put in new background for a selected area and it would have a border.

No comments:

Post a Comment