Information and Communication Technology - 0417 CIE

Use Stylesheets

Muhtasari

If HTML decides what is on a page, CSS decides how it looks. Cascading Style Sheets let you set the fonts, colours, spacing and alignment of your elements, and the clever part is the word cascading: when several styles could apply to the same element, clear rules decide which one wins. Write your styles once in an external file and you can give a whole website a consistent, professional look from a single place.

In this lesson you will learn the three ways to apply CSS (inline, internal and external) and the order of precedence between them, the syntax of a CSS rule with its selector and declarations, how to target elements, classes and ids, and the properties for fonts, colour, alignment and backgrounds. You will also see why external stylesheets must be linked with relative file paths.

Malengo

  1. Use CSS in the presentation layer.
  2. Create the presentation layer of a web page Create generic external styles and inline style attributes including: • background properties including colour, images • font properties • table, table row, table header and table data properties including size, background colour, horizontal and vertical alignment, spacing, padding, borders: including collapsed, colour, thickness, visible/invisible Create classes including: • background properties including colour, images • font properties • table, table row and table data properties including size, background colour, horizontal and vertical alignment, spacing, padding, borders: including collapsed, colour, thickness, visible/invisible Create external styles to be tagged in a web page including h1, h2, h3, p, li Specify the font properties including font family, size, colour, alignment, bold, italic Attach comments to an external stylesheet Save styles in cascading stylesheet format.
  3. The use of CSS in the presentation layer.
  4. Characteristics of cascading stylesheets including the difference between attached stylesheets and inline style attributes, the hierarchy of multiple attached stylesheets and inline styles within a web page Characteristics of a style and a class including the difference between them Reason relative file paths must be used for attached stylesheets.

Maelezo ya Somo

Styling kept in its own stylesheet is what makes a website easy to maintain and consistent across every page. Change one rule and every page that links the stylesheet updates at once. In the practical papers you create external stylesheets to a precise specification and attach them correctly, so understanding CSS syntax, the cascade and the difference between styles and classes is exactly what is being tested.

Inapatikana kwenye programu ya Green Bridge

Pakua programu ya Green Bridge CBT kwenye simu yako au kompyuta yako ili kupata maelezo kamili ya masomo, maswali ya mazoezi, na mengi zaidi.

Maelezo kamili ya masomo yenye michoro
Msaidizi wa kujifunza wa AI
Soma bila mtandao, wakati wowote, mahali popote
Inapatikana kwa Android, Windows, macOS, na Linux

Tathmini ya Somo

Hongera kwa kukamilisha somo la Use Stylesheets. Sasa kwa kuwa umechunguza dhana na mawazo muhimu, ni wakati wa kuweka ujuzi wako kwa mtihani. Sehemu hii inatoa mazoezi mbalimbali maswali yaliyoundwa ili kuimarisha uelewaji wako na kukusaidia kupima ufahamu wako wa nyenzo.

Utakutana na mchanganyiko wa aina mbalimbali za maswali, ikiwemo maswali ya kuchagua jibu sahihi, maswali ya majibu mafupi, na maswali ya insha. Kila swali limebuniwa kwa umakini ili kupima vipengele tofauti vya maarifa yako na ujuzi wa kufikiri kwa makini.

Tumia sehemu hii ya tathmini kama fursa ya kuimarisha uelewa wako wa mada na kubaini maeneo yoyote ambapo unaweza kuhitaji kusoma zaidi. Usikatishwe tamaa na changamoto zozote utakazokutana nazo; badala yake, zitazame kama fursa za kukua na kuboresha.

  1. Which way of applying CSS lets one file style many web pages at once? A. Inline style B. Internal style C. External stylesheet D. A comment Answer: C
  2. If an inline style and an attached stylesheet set the same property, which is used? A. The attached stylesheet B. The inline style C. Neither D. A random one Answer: B
  3. In the CSS rule p {color:#0000ff;}, the part 'p' is the: A. Property B. Value C. Selector D. Declaration Answer: C
  4. How is a class called right applied to a paragraph in the HTML? A.

    B.

    C.

    D.

    Answer: B

  5. In a font-family list, the generic font family (such as sans-serif) should be placed: A. First B. Last C. In the middle D. In a separate rule Answer: B

Inapatikana kwenye programu ya Green Bridge

Pakua programu ya Green Bridge CBT kwenye simu yako au kompyuta yako ili kupata maelezo kamili ya masomo, maswali ya mazoezi, na mengi zaidi.

Maelezo kamili ya masomo yenye michoro
Msaidizi wa kujifunza wa AI
Soma bila mtandao, wakati wowote, mahali popote
Inapatikana kwa Android, Windows, macOS, na Linux

Inapatikana kwenye programu ya Green Bridge

Pakua programu ya Green Bridge CBT kwenye simu yako au kompyuta yako ili kupata maelezo kamili ya masomo, maswali ya mazoezi, na mengi zaidi.

Maelezo kamili ya masomo yenye michoro
Msaidizi wa kujifunza wa AI
Soma bila mtandao, wakati wowote, mahali popote
Inapatikana kwa Android, Windows, macOS, na Linux

Fanya Mazoezi ya Maswali ya Majaribio

Ungependa kufanya mazoezi ya maswali ya majaribio kuhusu Use Stylesheets? Pakua programu ya Green Bridge CBT ili kupata maswali ya majaribio na tathmini kamili za mazoezi kuhusu mada hii.

Pakua Programu Kwenye Google Playstore

Kila kitu unachohitaji ili kufaulu katika JAMB, WAEC & NECO.

Green Bridge CBT Mobile App
Msaidizi wa Gumzo wa Kujifunza wa AI Uliobinafsishwa
Maelfu ya Maswali ya Zamani ya JAMB, WAEC & NECO
Zaidi ya Madaftari ya Masomo 1200
Msaada Nje ya Mtandao - Jifunze Wakati Wowote, Popote Pale
Ratiba ya Daraja la Kijani
Muhtasari wa Fasihi na Maswali Yanayoweza Kutokea
Fuata Utendaji na Maendeleo Yako
Maelezo ya Kina kwa Kujifunza kwa Kina