Layout style control

Source: Internet
Author: User
Tags character set end window access
Control §4.1 Font Size
HTML has seven kinds of font size, 1th is the smallest, 7th is the largest. The default font size is 3, you can use the <basefontsize= font size > Set the default font size.
There are two ways to set the font size of the text, one is to set the absolute font size, <font size= font size >; The other is to set the relative font size of the text; <font size=±n>. With the second method, the "+" sign indicates that the font is larger, and the "-" sign indicates that the font is smaller.
<font Size=7>today is Fine!</font>today is fine!
<font Size=6>today is Fine!</font>today is fine!
<font Size=5>today is Fine!</font>today is fine!
<font Size=4>today is Fine!</font>today is fine!
<font Size=3>today is Fine!</font>today is fine!
<font Size=2>today is Fine!</font>today is fine!
<font Size=1>today is Fine!</font>today is fine!

§4.1.2 font Style
Font style is divided into physical style and logical style. Physical style directly specifies the font, the physical style of the font has <b> bold,<i> italic,<u> underline,
<tt> typewriter body. The logical style specifies the function of the text.
<em> Emphasis <srrony> Special emphasis <code> source code
<samp> Examples <kbd> keyboard input <var> variables
<dfn> definitions <cite> References <small> Small
<big> larger <sup> superscript <sup> subscript
Physical style
<b>today is Fine!</b>today is fine!
<i>today is Fine!</i>today is fine!
<u>today is Fine!</u>today is fine!
<tt>today is Fine!</tt>today is fine!
Logical style


§4.1.3 Font Color
The color of the font is specified with <font color=#> # can be 6-bit 16-digit, specifying red, green, and blue values, or Black,olive,teal,red,blue,maroon,navy,gray,lime,fudrsia, White,green,

One of the Purple,sliver,yellow,aqua.


§4.1.4 Flashing
<blink> text </blink> make text blink with a blink rate of 1 seconds.


§ 4.2 Horizontal line (HR)
A horizontal line commonly used to separate different parts of the same genre. It's very simple to draw a horizontal line in a window, just write a Examples The position of the horizontal line is specified with #是left成right之一, left indicates that the left is aligned with the left-hand side, right is aligned to the right, and the horizontal line appears in the middle of the window by default.


4.3 Rows of images
The line image makes your page more beautiful, but the line image leads to a sharp increase in network traffic. Extend the access time. So in the homepage (homepage), it is not advisable to use a large image. If you do need some large images, it's a good idea to point to the original image with a smaller image in the home page and indicate the size of the diagram. This allows readers to quickly access your home page and choose whether or not to look at the images.
The basic format of the image is:
or image-url is the URL of an image file. Currently, most browsers support. gif and. xbm files, and Netscape also supports JPEG files. The ALT attribute tells browsers that do not support images to replace the diagram with text.


4.3.2 the alignment of image and text
The image will occupy a space in the window, and there may be whitespace around the image, and when not specified, the browser displays the following text in these blanks, where the display is specified by the Align property.
 
When using ALIGN=LEFT,RIGHR, the image is a floating image. For example Align=left, the image must be next to the left border, it "squeezed" the text that originally occupied the block, or squeezed it to the right, or squeezed it up and down.
The spacing between the text and the image is #指定 with the vspace=#,hspace=, #是整数, the pixel, which specifies the vertical spacing and the horizontal spacing.


4.4 Branch <BR> and Forbidden Branch <nobr>
<Br> says here the branch,<nobr>....</nobr> is called the Notice browser, in which the content is displayed in one line, if the line cannot display, then the excess part is cropped off.
The <br Clear=#>clear property indicates the next line, such as Clear=left, which means that the next line starts at the left border. #可以是left, one of the right,all. Cases:


§4.5 Background and text color
The window background can be specified in the following ways
<body background= "Image-url" >
<body bgcolor=# text=# link=# alink=# vlink=#>
The former specifies the image of the fill background, and if the image is smaller than the size of the window, repeat the background image until it fills the window area.
The latter specifies the 16 red, green, and blue components.
bgcolor background color
Text text color
Link links pointer Color
Alinik Active link pointer color
Vlinik the link pointer color that has been visited
Example <body bgcolor=ffoooo> red background color.
Note that at this point the BODY element must be written in full, that is, the <body> end


4.6 Escape words will be associated with special characters
< in HTML, >,& has special meaning (the first two characters are used for link-check,& for escape) and cannot be used directly. When you use these three characters, you should use their escape sequences.
The & escape sequence is & Amps or & #38;
The < escape sequence is & lt; & #60;
The > Escape sequence is & gt; & #62;
The former is a character escape sequence, and the latter is a numeric escape sequence.
For example & Lt; Font &Lgt; shown as <font> if directly written as <font> is considered a link sign.
What needs to be stated is:
A. There should be no spaces between the characters of the escape sequence;
B. The escape sequence must end with ";";
C. A separate & is not considered to be an escape start.
such as "& lt;" is interpreted as "& lt;" Instead of <
"&# 62;" was interpreted as "& # 60;" Instead of >
Another character that needs to be escaped is the quotation mark, whose escape sequence is "" or "", for example


The character set used by HTML is the ISO &859 Larin-1 character set, which has many characters that cannot be entered on a standard keyboard. Only escape sequences can be used for these special characters.



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.