How to add static stylesheet

Adding static stylesheet

Lesson Details:
June 29, 2020


I: Introduction

A: Cloud computing for machine learning

Cloud computing, a major development in the field of information technology, is increasingly being used for computation and storage needs. Cloud computing has led to an increase in the use of machine learning in data analytics.

II: Body

A: Adding static stylesheet

The addition of a static stylesheet enables an application to display content in a variety of ways, similar to the way websites are created using HTML. The JavaScript code added to an HTML page uses the HTML5 style tags to define CSS rules to be applied to the page. The JavaScript code adds the style sheet to the HTML document by creating an external link to the stylesheet file. This external link is then embedded into the HTML page using the HTML tag. A sample HTML5 page with an external stylesheet link is shown below.

Example

Title of the Page

HTML5 supports content in multiple languages.

Figure 1: A sample HTML5 page with an external stylesheet link

Addition of a style sheet into an HTML page allows the application to change the appearance of all elements in that page. This can be done by defining an element's style rules using CSS syntax. The preferred way of adding the CSS rules is to use the class attribute of HTML elements. As shown below, an additional CSS rule can be defined for the body element based on the class attribute added to it.

Example

Title of the Page

HTML5 supports content in multiple languages.

Figure 2: An example HTML5 page with an external stylesheet link and additional CSS rules defined for body

loader
Course content