Information and Communication Technology - 0417 CIE

Use Stylesheets

Akopọ

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.

Awọn Afojusun

  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.

Akọ̀wé Ẹ̀kọ́

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.

O wa lori ohun elo Green Bridge

Gba ohun elo Green Bridge CBT sori foonu tabi kọmputa rẹ lati ri awọn akọsilẹ ẹkọ ni kikun, awọn ibeere adaṣe, ati diẹ sii.

Awọn akọsilẹ ẹkọ ni kikun pẹlu awọn aworan apejuwe
Oluranlọwọ ẹkọ ti AI ṣe agbara rẹ
Kọ ẹkọ laisi intanẹẹti, nigbakugba, nibikibi
O wa lori Android, Windows, macOS, ati Linux

Ìdánwò Ẹ̀kọ́

Oriire fun ipari ẹkọ lori Use Stylesheets. Ni bayi ti o ti ṣawari naa awọn imọran bọtini ati awọn imọran, o to akoko lati fi imọ rẹ si idanwo. Ẹka yii nfunni ni ọpọlọpọ awọn adaṣe awọn ibeere ti a ṣe lati fun oye rẹ lokun ati ṣe iranlọwọ fun ọ lati ṣe iwọn oye ohun elo naa.

Iwọ yoo pade adalu awọn iru ibeere, pẹlu awọn ibeere olumulo pupọ, awọn ibeere idahun kukuru, ati awọn ibeere iwe kikọ. Gbogbo ibeere kọọkan ni a ṣe pẹlu iṣaro lati ṣe ayẹwo awọn ẹya oriṣiriṣi ti imọ rẹ ati awọn ogbon ironu pataki.

Lo ise abala yii gege bi anfaani lati mu oye re lori koko-ọrọ naa lagbara ati lati ṣe idanimọ eyikeyi agbegbe ti o le nilo afikun ikẹkọ. Maṣe jẹ ki awọn italaya eyikeyi ti o ba pade da ọ lójú; dipo, wo wọn gẹgẹ bi awọn anfaani fun idagbasoke ati ilọsiwaju.

  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

O wa lori ohun elo Green Bridge

Gba ohun elo Green Bridge CBT sori foonu tabi kọmputa rẹ lati ri awọn akọsilẹ ẹkọ ni kikun, awọn ibeere adaṣe, ati diẹ sii.

Awọn akọsilẹ ẹkọ ni kikun pẹlu awọn aworan apejuwe
Oluranlọwọ ẹkọ ti AI ṣe agbara rẹ
Kọ ẹkọ laisi intanẹẹti, nigbakugba, nibikibi
O wa lori Android, Windows, macOS, ati Linux

O wa lori ohun elo Green Bridge

Gba ohun elo Green Bridge CBT sori foonu tabi kọmputa rẹ lati ri awọn akọsilẹ ẹkọ ni kikun, awọn ibeere adaṣe, ati diẹ sii.

Awọn akọsilẹ ẹkọ ni kikun pẹlu awọn aworan apejuwe
Oluranlọwọ ẹkọ ti AI ṣe agbara rẹ
Kọ ẹkọ laisi intanẹẹti, nigbakugba, nibikibi
O wa lori Android, Windows, macOS, ati Linux

Ṣe Adaṣe Awọn Ibeere Idanwo Adaṣe

Ṣe o fẹ ṣe adaṣe awọn ibeere idanwo adaṣe nipa Use Stylesheets? Ṣe igbasilẹ ohun elo Green Bridge CBT lati wọle si awọn ibeere idanwo adaṣe ati awọn ayẹwo adaṣe kikun fun koko-ọrọ yii.

Ṣe igbasilẹ ohun elo naa lori Google Playstore

Gbogbo ohun ti o nilo lati ṣe dara julọ ninu JAMB, WAEC ati NECO.

Green Bridge CBT Mobile App
Asiko ẹkọ AI ti ara ẹni Chat Assistant
Ẹgbẹẹgbẹrun Awọn Ibeere Atijọ JAMB, WAEC & NECO
Fiwọn 1200 Awọn akọsilẹ Ẹkọ ju.
Atilẹyin Aisinipo - Kọ ẹkọ Nigbakugba, Nibi gbogbo
Tẹ̀dí Green Bridge
Àkójọpọ̀ Ìtàn Lítíréṣọ̀ & Ìbéèrè Tó Lè Dáyéé ṣẹ́lẹ̀
Tẹle iṣẹ ṣiṣe rẹ ati ilọsiwaju rẹ.
Àlàyé tí ó jinlẹ̀ fún ìmòye tó jinlẹ̀.