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.

HTML

HTML was the first way that you could create a website. HTML was the way that everybody would create a website now there are various programs that will do all the hard work for you. Such as Adobe Dreamweaver.
In the image about you will see the first step of the process of creating a website using HTML. In the first step we opened a black notepad document and wrote in “This is my first page”. Then we save ha to save the file as an .hmtl so that the Pc would know that that document was a HMTL code and would work with an internet browser. Then I saved the document and started to create a webpage using HMTL. Also HMTL stands for Hyper Text mark-up language.
In this image I have added a tag. There are 3 different tags in this image: <!DOCTYPE html>, <html>, <body>. The first tag, <!DOCTYPE html>, is there to let that web browser know what you are what type of html you are using. If you do not add this in then the code that you type in will not present you with the outcome that you desire. The next tag, <html> tell the web browser that all the content between the opening and closing tag of <html> and </html> is all an html document. The final tag <body> is there to tell the web browser that everything between the <body> and </body> are the main body of text that will be on the webpage.
I this step I added a title. The title of the web page it the tab of the page and the title is also used if you bookmark and favourite the webpage. With <head><title>my first web page</title></head>.
In the fourth step I added a paragraph. The in the content of the document if you were to just press enter and go to a new line then you think that it would do the same in the web page, but it doesn't. To create a new paragraph you have to start the new paragraph with <p> and end it with </p> then the content in between will be put onto a new line on the web page.
In this image I am adding a heading. The html code for the headings is <h1></h1>. The number after the h is relative to the size and order of the heading.
In this image I am adding lists to the document. The way to do this is to add the codes <ul>, <li> and <ol>. <ul> defines that you want to start a list. <li>, this code tells the web browser that is this the list. Finally <ol>, this code tells the web browser that you want to add in a sub list within the list that you have created.
I added a link to the web page by adding the hmtl code <a href="http://www.htmlgog.com">HTML Dog</a>. The <a> tell the web browser that the following content is going to be a link. The “href” part to the code is telling the web browser the destination of the link. The “HTML Dog” part of the code is where about on the website the link is.
In the image above I’ve added an image to the web page. I did this by add the html code <img src="http://www.htmldog.com/badge1.gif" width="120" height"90" alt="HTML Dog">
</body>. “src=” this part is the location to the image that you wish to put onto the website. “width= and height=” these are self-explanatory in they allow you to change the size of the image. The “alt=” is the part of the code that is there for people that can’t see the image and need and audio description of it or people that can see the image properly and need a description of the image.
In this image I have added a table to the web page the three codes you need for this are <table>, this inform the web browser that everything in between the open and close code is a table. The next code you need is <tr> this is what you need for the table row. Finally you need <td> is the data cell.
This final image shows you how to create a form using html. Firstly there is a drop down options menu. You create this by using the html code <select> on the outside. The next code you will need it <option> this code allows you to create the option that you wish to put inside of your drop down menu. Next, there is a single line input box for names the code to allow you to do this is <input name="name" value="Your name">. The next code is to create a large text box the code for this is <textarea rows="10" cols="20" name="comments">Your comments</textarea>. The <textarea> is telling the browser was it is and the rest of the code in the middle is the information about it. Second to last there is an options menu. The code is <input type="radio" name="areyou" value="male"> this code will allow you to create the option for a male. This type of options menu is not clumped together in the code like the drop down menu is but instead they are all individual. And finally there is a submit button that allows the reader of the webpage you submit the form, the code for this is <input type="submit">.