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 a text, its size, the spacing between lines, etc.

Labels used

<style> </style>

Tag that allows to include styles in the HTML document.

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

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

Exercise

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

Make an HTML document like the one below, 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