The zero-based HTML tutorial (3): Customizing the style of Web pages, recognizing attributes

Source: Internet
Author: User

In this lesson, let's learn what attributes are and how to change the background of a Web page.

First, web DIY

1. I want to change the background color of the page to black what should I do?

Try to change <body> into <body style= "Background-color: #000000;" > it.

Have you finished, uh ...

The background changed to black, because the text is also black, can't see the text. <body style= "Background-color: #000000;" > style defines <body>, which is the background color of the main body of the page is 16 #00000 (black).

2. By the way the color of the text also changed it.

<span> is used to control the label of small segment characters , <span style= "color: #ffffff;" The > style defines the color of the text within the <span> element as 16-#ffffff (white).

Two, the attribute in the HTML

Properties usually appear in this form (the red font is a property): <span style= "color: #ffffff;" "style" is the property of <span> . The style attribute is used to assign a performance property to a specific element , and the style will take effect regardless of any global style settings . Other attributes are:ID, class, title, Lang, abbr , etc.

36 or 16 in color

The hexadecimal color code begins with a # number, and three sets of 16 digits represent an RGB three-color, each set of numbers from 0 to FF. Do not know the hexadecimal students do not have to worry about finding the color they want, we use this dreamweaver in the input "<color:#" will jump out of the color selection box , choose the color you want, the software will Automatically fill in the hexadecimal code for you.

How to change the font and color?

is still implemented through the style attribute. In the style property, add:

"Font-famil: song body ; font-size:200%;"
Font-famil: To set the font, Font-size is to set the font size.

This tutorial describes how to modify the meaning of fonts and attributes in HTML, and try to modify your favorite fonts and colors to practice. The next lesson is how to structure the Web page of the tutorial, learning to complete you can be out of the HTML rookie, please look forward to!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.