Information Communication Technology ICT – 21 Website authoring | e-Consult
21 Website authoring (1 questions)
Login to see all questions.
Click on a question to view the answer
External styles are CSS (Cascading Style Sheets) rules that are defined in a separate .css file and then linked to an HTML document. This allows for consistent formatting across multiple web pages, making website maintenance easier.
To use external styles, the element is used within the
head
section of the HTML document. Therel attribute is set to stylesheet and the href attribute specifies the path to the external .css file. Once linked, CSS rules within the external stylesheet can be applied to HTML elements using their respective tags. For example:
- : The
h1element can be styled using CSS to control its font size, color, and alignment. - : Similar to
h1, theh2element's appearance can be controlled. - : The
h3element can be styled to create a hierarchy of headings. - : The
pelement can be styled to control line height, margins, and font. - : The
lielement (used within- and
- lists) can be styled to control bullet points, indentation, and font.
This approach promotes separation of content (HTML) and presentation (CSS), leading to cleaner and more maintainable code.