Presentation is loading. Please wait.

Presentation is loading. Please wait.

To Proudly supported by ferrycake.com. We will be printing Cash for your Community tokens every week in the Carmarthen Journal and Llanelli Star. The.

Similar presentations


Presentation on theme: "To Proudly supported by ferrycake.com. We will be printing Cash for your Community tokens every week in the Carmarthen Journal and Llanelli Star. The."— Presentation transcript:

1 To Proudly supported by ferrycake.com

2 We will be printing Cash for your Community tokens every week in the Carmarthen Journal and Llanelli Star. The more tokens you cut out and collect, the greater the share of our £10,000 prize pot your group will receive. So once you've received your registration, get out there and spread the word! Ask your friends, family, work colleagues and anyone from your local community to collect tokens on your behalf.

3 What is a tag used for ? What is difference between and in a list ? Want is missing ? “www.google.com

4

5 The Internet The Router, it gives the laptops their address. The switch allows us to Connect all our kit The Pi ( or our sever ). It acts As our webserver.

6 What is CSS? CSS stands for Cascading Style Sheets CSS defines how HTML elements are to be displayed Styles were added to HTML 4.0 to solve a problem CSS saves a lot of work External Style Sheets are stored in CSS files My super webpages

7

8 HTML was NEVER intended to contain tags for formatting a document. HTML was intended to define the content of a document, like: This is a heading This is a paragraph. When tags like, and color attributes were added to the HTML 3.2 specification, it started a nightmare for web developers. Development of large web sites, where fonts and color information were added to every single page, became a long and expensive process. To solve this problem, the World Wide Web Consortium (W3C) created CSS. In HTML 4.0, all formatting could (and should!) be removed from the HTML document, and stored in a separate CSS file. CSS Saves a Lot of Work! The style definitions are normally saved in external.css files. With an external style sheet file, you can change the look of an entire Web site by changing just one file!

9 A CSS rule set consists of a selector and a declaration block: The selector points to the HTML element you want to style. The declaration block contains one or more declarations separated by semicolons. Each declaration includes a property name and a value, separated by a colon.

10 p { color: red; text-align: center; }

11 The element selector selects elements based on the element name. You can select all elements on a page like this: (all elements will be center- aligned, with a red text color) The id Selector The id selector uses the id attribute of an HTML element to select a specific element. An id should be unique within a page, so the id selector is used if you want to select a single, unique element. To select an element with a specific id, write a hash character, followed by the id of the element. The style rule below will be applied to the HTML element with id="para1": #para1 { text-align: center; color: red; } Example 2

12 The class selector selects elements with a specific class attribute. To select elements with a specific class, write a period character, followed by the name of the class: In the example below, all HTML elements with class="center" will be center-aligned:.center { text-align: center; color: red; } Example 3

13 Background Color The background-color property specifies the background color of an element. The background color of a page is set like this: Example body { background-color: #b0c4de; } Example 4

14 In the example below, the,, and elements have different background colors: Example h1 { background-color: #6495ed; } p { background-color: #e0ffff; } div { background-color: #b0c4de; } Example 5

15 Background Image The background-image property specifies an image to use as the background of an element. By default, the image is repeated so it covers the entire element. The background image for a page can be set like this: Example body { background-image: url("paper.gif"); } Example 6

16 Showing the image only once is specified by the background-repeat property: Example body { background-image: url("img_tree.png"); background-repeat: no-repeat; } Example 7

17 In the previous example, the background image is shown in the same place as the text. We want to change the position of the image, so that it does not disturb the text too much. The position of the image is specified by the background-position property: Example body { background-image: url("img_tree.jpg"); background-repeat: no-repeat; background-position: right top; } Example 8

18 Example 9 Text Color The color property is used to set the color of the text. With CSS, a color is most often specified by: a HEX value - like "#ff0000" an RGB value - like "rgb(255,0,0)" a color name - like "red" Look at CSS Color Values for a complete list of possible color values.CSS Color Values The default color for a page is defined in the body selector. body { color: blue; } h1 { color: #00ff00; } h2 { color: rgb(255,0,0); } Example 10

19 The text-align property is used to set the horizontal alignment of a text. Text can be centered, or aligned to the left or right, or justified. When text-align is set to "justify", each line is stretched so that every line has equal width, and the left and right margins are straight (like in magazines and newspapers). h1 { text-align: center; } p.date { text-align: right; } p.main { text-align: justify; } Example 11

20

21

22

23

24


Download ppt "To Proudly supported by ferrycake.com. We will be printing Cash for your Community tokens every week in the Carmarthen Journal and Llanelli Star. The."

Similar presentations


Ads by Google