How to connect html to css

PHPz
Release: 2023-04-27 16:51:12
Original
6264 people have browsed it

HTML and CSS are important components of front-end technology. Cooperation between the two can help the page achieve a better appearance and interactive experience. This article will introduce how HTML is associated with CSS to achieve page style control.

1. About HTML and CSS

HTML is the basic structure of a web page and can be understood as the skeleton of a house. It defines the content, layout, tags and links in the web page. CSS is a style sheet, which can be understood as the decoration of a house. It controls the appearance, layout and color of the web page.

2. Add CSS to HTML

There are two ways to add CSS style sheets to HTML documents, namely internal styles and external styles. They will be introduced below:

  1. Internal style

Internal style is to add the

Welcome to my website

This is the home page of my website

Copy after login

In the above code, the