How To Color Your Page

Table of contents:

How To Color Your Page
How To Color Your Page

Video: How To Color Your Page

Video: How To Color Your Page
Video: 🎨 HOW TO COLOR YOUR DRAWINGS (in 5 simple steps) 2024, November
Anonim

The colored background on the site not only attracts the attention of visitors, but also conveys the mood of the resource. Space-themed sites create an atmosphere of mystery with a background in the form of a starry sky, entertainment resources cheer up with rich colors of warm colors, web services of city services show their officiality with austere design and backgrounds of mostly gray and blue shades. There are several ways to make your own web page colored.

How to color your page
How to color your page

It is necessary

  • - your site
  • - at least basic knowledge of HTML

Instructions

Step 1

To make a solid colored background, find the following tags and in the HTML code. Change the first tag like this:

In this construction, # FFFF33 is the encoded shade of yellow.

Step 2

The page color can be specified not only with a code, but also with special words - the names of the primary colors. To indicate the background color with a word, write the following code:

Here "yellow" is the name of the color yellow.

Step 3

Instead of the yellow code mark or its name, add the desired designation of the background color you need to the tag using this hint:

red - "red" ("# FF0000")

blue - "blue" ("# 0000FF")

green - "green" ("# 008000")

pink - "pink" ("# FFC0CB")

purple - "violet" ("# EE82EE")

orange - "orange" ("# FFA500")

black - "black" ("# 000000")

Step 4

If you want to have a repeating image on the background of the site, then choose a small picture, against which the text will be clearly visible. Upload a picture to the site. To place an image as a background, enter this code into the tag

In this entry, instead of "/images/fon.jpg" specify the path to the desired image.

Step 5

The color of web pages can be set not only in HTML code, but also using CSS styles. Using these styles, you don't need to set the background in the code of a new page every time. To define a background in CSS between tags and place an entry like this:

body {

background: # FFFF33;

}

Here the background color is set by the background parameter.

Step 6

If you want to make a background in CSS using an image, then between and write the following code, instead of '/images/fon.jpg' specifying the path to the desired image:

body {

background-image: url ('/ images / fon.jpg');

background-repeat: repeat;

}

Here the background-image parameter defines the background image, background-repeat - the repetition of the image. On the page.

Recommended: