Information and Communication Technology - 0417 CIE

Use Stylesheets

Aperçu

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.

Objectifs

  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.

Note de cours

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.

Disponible sur l'application Green Bridge

Téléchargez l'application Green Bridge CBT sur votre téléphone ou votre ordinateur pour accéder aux notes de cours complètes, aux questions pratiques, et plus encore.

Notes de cours complètes avec diagrammes
Assistant d'apprentissage piloté par l'IA
Étudiez hors ligne, n'importe quand, n'importe où
Disponible sur Android, Windows, macOS et Linux

Évaluation de la leçon

Félicitations, vous avez terminé la leçon sur Use Stylesheets. Maintenant que vous avez exploré le concepts et idées clés, il est temps de mettre vos connaissances à lépreuve. Cette section propose une variété de pratiques des questions conçues pour renforcer votre compréhension et vous aider à évaluer votre compréhension de la matière.

Vous rencontrerez un mélange de types de questions, y compris des questions à choix multiple, des questions à réponse courte et des questions de rédaction. Chaque question est soigneusement conçue pour évaluer différents aspects de vos connaissances et de vos compétences en pensée critique.

Utilisez cette section d'évaluation comme une occasion de renforcer votre compréhension du sujet et d'identifier les domaines où vous pourriez avoir besoin d'étudier davantage. Ne soyez pas découragé par les défis que vous rencontrez ; considérez-les plutôt comme des opportunités de croissance et d'amélioration.

  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

Disponible sur l'application Green Bridge

Téléchargez l'application Green Bridge CBT sur votre téléphone ou votre ordinateur pour accéder aux notes de cours complètes, aux questions pratiques, et plus encore.

Notes de cours complètes avec diagrammes
Assistant d'apprentissage piloté par l'IA
Étudiez hors ligne, n'importe quand, n'importe où
Disponible sur Android, Windows, macOS et Linux

Disponible sur l'application Green Bridge

Téléchargez l'application Green Bridge CBT sur votre téléphone ou votre ordinateur pour accéder aux notes de cours complètes, aux questions pratiques, et plus encore.

Notes de cours complètes avec diagrammes
Assistant d'apprentissage piloté par l'IA
Étudiez hors ligne, n'importe quand, n'importe où
Disponible sur Android, Windows, macOS et Linux

Pratiquez des questions blanches

Vous voulez vous entraîner sur des questions blanches sur Use Stylesheets ? Téléchargez lapplication Green Bridge CBT pour accéder à des questions blanches et à des évaluations complètes sur ce sujet.

Téléchargez l'application sur Google Play.

Tout ce dont vous avez besoin pour exceller au JAMB, WAEC et NECO.

Green Bridge CBT Mobile App
Assistant de chat d'apprentissage personnalisé par IA
Des milliers d'anciens sujets JAMB, WAEC et NECO.
Plus de 1200 notes de cours
Assistance Hors Ligne - Apprenez à Tout Moment, Partout
Horaire du Pont Vert
Résumés littéraires et questions potentielles
Suivez vos performances et votre progression
Explications Approfondies pour un Apprentissage Complet