HTML, CSS and Scripting Flashcards
What does the head contain?
Context that does not appear in a browser window
What are meta data uses?
- provide a description of the webpage
- provide browser software with links to CSS and JavaScript files
- provide information to search engines
- include key words
- provide information about page creation date
Examples of meta data.
< meta name = “description” content = “HCS PowerPoint” >
< meta name = “keywords” content = “HTML, CSS” >
< meta name = “author” content = “ Mr Rankin” >
What are disadvantages of meta data?
- some websites ‘overload’ the head with meta tag keywords to improve search result rankings
- therefore meta tags are often ignored by search engines
What is CSS styling?
While HTML tells the browser what to display on a page, CSS tells the browser how to display it. It can be:
- internal
- external
- inline
Example of CSS.
h1 { colour:blue; font size:12px:}
h1 = selector
colour:blue; / font size:12px: = declaration
colour/font size = property
blue/12px = value
What is internal CSS styling?
- used to apply a rule to a single page
- defined in the head section of an HTML page
- placed inside the ….tags
What is external CSS styling?
- applies a rule to multiple pages
- internal CSS is a separate file accessed by creating a link within the head of the webpage
- multiple webpages can use the same link to access the stylesheet
What as external CSS advantages?
- one change to the style sheet will change all the linked pages
- you can create classes of styles that can be used on many different HTML elements
- consistent look and feel across multiple web pages
- one style sheet can be applied to multiple pages reducing development time
What are classes?
Classes operate in a similar way to element IDs. They can be applied across a range of elements. The symbol for class selections is “..” It comes before the name of the class
What is scripting client side?
- JavaScript is the main client side scripting language that can be used to create, delete and manipulate HTML elements
- Use and tags to let the browser know that anything contained between these tags is written in JavaScript
- Within these tags you can write JavaScript code of link to an external JavaScript file
- The scripting language needs to be enabled on the client computer
- If a user is conscious of security risks they may switch the scripting facility off
What is scripting server side?
- E commerce sites, online multiplayer games and social media sites
- Usually used to provide interactive web sites that interface to databases or other data stores on the server
What are advantages of server side?
Ability to customise the response based on the users requirement access rights, or queries into data stores
What are the four stages to server side scripting?
1: Server receives data from the client - request to receive a webpage, user completed form entries
2: Validation will occur - form data such as usernames and passwords, email addresses etc checked for validating server side, if data is not valid, server will send message back to client that is then interpreted by the browser software and output on the dynamic webpage
3: Valid data can be used to query a database server side using languages like MySQL
4: After the server executed the query, a result is sent back to the client
What does scripting sever side help generate?
Dynamic and database driven web pages/ sites