Introduction to CSS Basics Tutorial

Introduction to CSS

  • CSS Cascading Style Sheets cascading style sheets.

  • The main purpose of CSS is to add various expressions (formats, styles) to HTML tags. For example: text style, background, text style, link style.

Tip: CSS is the style added to HTML tags; JS is the behavior added to HTML tags. HTML tags come first.

  • HTML Hypertext Markup Language: various HTML tags.

  • CSS Cascading Style Sheets: Styles added to HTML tags.

  • JavaScript script program: a program that adds HTML tags.

Let’s look at a simple example:

<!DOCTYPE HTML>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <title>php.cn</title>
    <style type="text/css">
        h1{
            color:red;
            border:1px solid black;
            text-align:center;
            background-color:#666666;
        }
    </style>
    </head>
    <body>
        <h1>欢迎加入php.cn</h1>
    </body>
</html>

After learning HTML, do you feel that you can understand these words? It doesn’t matter if you don’t understand. We will introduce it in detail next. of



Continuing Learning
||
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>php.cn</title> <style type="text/css"> h1{ color:red; border:1px solid black; text-align:center; background-color:#666666; } </style> </head> <body> <h1>欢迎加入php.cn</h1> </body> </html>
submitReset Code