Three, layout style control
1. Font Control
A. Font size
With <font size=#> and </font>, # is the font size: 1-7, the default is 3, you can use <basefontsize= font size > change the default font size.
There are two ways to set the font size:
L set absolute font size; <font size= Font Size >
L Set the relative font size; <font size=±n>, based on the default font size, the "+" sign indicates that the font is larger, and the "-" sign indicates that the font is smaller.
B. Font style
Font style is divided into physical style and logical style.
Physical styles directly specify fonts, physical style fonts have <B> blackbody, <I> Italic, <U> underline, <TT> typewriter body.
The logical style specifies the purpose of the text. <EM> emphasis; <STRONG> special emphasis; <CODE> source code; <SAMP> example; <KBD>
Keyboard input, <VAR> variables, <DFN> definitions, <CITE> references, <SMALL> smaller, <BIG> larger, <SUP> superscript, <SUB> subscript.
<b>today is fine!</b>
<i>today is fine!</i>
<u>today is fine!</u>
<tt>today is fine!</tt>
} "align=" Baseline "border=" 0 "/>
Logical style Specifies the role of text
<DFN> definition: Used to define the style of a word. It is usually displayed in italic font
<EM> emphasis: It is usually also shown as italic.
<STRONG> Special emphasis: Display in bold font. e.g. (important matters)
<CODE> Source code: Shows the program code of the excerpt, displayed in a fixed-size font
<KBD> keyboard input: Used to display the user's keyboard input. Highlighted in bold font, many
The viewer is displayed directly in equal-width font
<VAR> variable: Represents a variable, usually shown in italics
<SMALL> smaller
<BIG> Large
Superscript <SUP> Superscript
Subscript <SUB> Subscript
C. Font Color
The color of the page is composed of "red", "green" and "blue" primaries, and the color depth is defined in HTML with 16-in
, the three primary colors of HTML are given two 16 to define, that is, each primary color can have 256 depth, so the three primary colors
Can be mixed into the color of 1600 bai million (16777216).
For example
White red=ff, Green=ff, BLUE=FF, RGB value is FFFFFF
Red Red=ff, green=00, blue=00, RGB value is ff0000
Green red=00, Green=ff, blue=00, RGB value is 00ff00
Blue red=00, green=00, BLUE=FF, RGB value 0000ff
Black red=00, green=00, blue=00, RGB value is 000000
Apps often precede each RGB value with a symbol # to show the difference, not to add.
See Common RGB color table
You can also use the following predefined colors black, olive (olive), teal (black green, water duck), red, blue, maroon (chestnut),
Navy (aquamarine), gray (gray), lime (lime), fudrsia (fuchsia) white, green, purple (purple),
Sliver, yellow, one of aqua (light green).
Color |
Color effectiveness |
English name |
Hexadecimal RGB value |
Black |
|
Black |
#000000 |
Silver |
|
Silver |
#C0C0C0 |
Grey |
|
Gray |
#808080 |
White |
|
White |
#FFFFFF |
Reddish purple color |
|
Maroon |
#800000 |
Red |
|
Red |
#FF0000 |
Purple |
|
Purple |
#800080 |
Purplish red |
|
Fudrsia |
#FF00FF |
Green |
|
Green |
#008000 |
Green Grass |
|
Lime |
#00FF00 |
Olive color |
|
Olive |
#808000 |
Yellow |
|
Yellow |
#FFFF00 |
Sea Blue |
|
Navy |
#000080 |
Blue |
|
Blue |
#0000FF |
Black Green |
|
Teal |
#008080 |
Light Blue |
|
Cyan |
#00FFFF |
<font size=7 color=red> (red) </Font><br>
<font size=6 color=fudrsia> (magenta) </Font><br>
<font size=5 color=silver> (silver) </Font><br>
<font size=4 color=lime> (grass green) </Font><br>
<font size=3 color=blue> (blue) </Font><br>
<font size=2 color=maroon> (maroon) </Font><br>
<font size=1 color=black> (Black) </Font><br>
2. horizontal line (HR)
A horizontal line used to separate different parts of the same genre.
Size=n, the vertical width of the horizontal line, the unit of n is the pixel, such as:
width = #, horizontal line length, # can be a pixel, a percentage of two representations
align=# the position of the horizontal line. # is defined as follows.
Left aligned;
Right alignment;
Center Center Alignment (default)
<HR size=3 width=50% align=center >
1. picture and text mixed row
A. Adding an image to a page
Images make the page more beautiful, but images can cause network traffic to increase. Extended access time. So on the homepage (homepage), it is inappropriate to pick
Use a large number of images.
The basic format of the image is:
For example: (this is the absolute path)
?/p>
or
Image-url is the URL of the image file. Most browsers support. gif and. jpg files, and Alt properties tell you that images are not supported for browsing
Replace the diagram with text.
Assuming the picture is top-1.gif, there are usually several forms of SRC:
L src= "Top-1.gif"
L src= "Image/top-1.gif"
L src= ". /top-1.gif "
L Src=http://www.rwsky.com/image/top-1.gif
The first type: src= "top-1.gif": top-1.gif must be placed in the same folder as the HTML file.
The second type: src= "image/top-1.gif": top-1.gif must be placed in the Image subfolder under the folder where the HTML file resides.
The Third Kind: src= ". /top-1.gif ": top-1.gif must be placed in the upper folder (parent folder) of the folder where the HTML file resides.
The fourth type: src= "http://www.rwsky.com/image/Top-1.gif": Image file Top-1.gif must be placed in the image subdirectory of www.rwsky.com this Web server host directory (default = wwwroot) Under
The first three types are called relative URLs, and the fourth is called absolute URLs.
<body background= "Image-url" > Specify background image
<body bgcolor=# text=#> Specify background and text color
Image-url: The image of the fill background, the image size is smaller than the window, the background image is repeated
Full window area.
bgcolor: Color 16 red, green, blue components such as 00FF00 (green).
Text: Color
Link: pointer color
Alinik: The active link pointer color (that is, when the mouse button is pressed on the link has not
State of release)
Vlinik: The color of the link pointer that has been visited
Example: tiling of background images
<body background= "Fish.jpg" >
<body bgcolor=silver text= #ff0000 >
<font size=4> Wonderful Network </font>
</body>
HTML QuickStart 2