1. Style Label

The <style> tag within the HTML code allows you to add styles to the content of the HTML document. An example of style is the color of text, its size, the separation between lines, etc.

Tags used

<style> </style>

Tag that allows styles to be included in the HTML document.

This tag must be inserted in the <head> section of the HTML document.

/* Comment */
This is the format that comments have within the <style> section or within a style sheet CSS file.

Exercise

On the w3schools CSS colors page you can see the 140 named colors available in all browsers

Create an HTML document like the following, with the colors changed.

Código del fichero css-style.html

Result

Resultado de visualizar los ficheros css-style.html y css-style.css en un navegador