HTML Common code integration;

Source: Internet
Author: User
Tags border color

HTML+CSS Code Text Settings
1. Font-size: Font size parameter 2, Font-style: typeface format 3, Font-weight: Font weight 4, Color property: Parameter Note Use Web-safe color

  Hyperlink Settings
Text-decoration: The main purpose of the parameter is to change the underline when the browser displays text links. Parameter value range: underline: Underline text overline: Underline text Line-through: Add strikethrough to text blink: Make text blink none: Do not show any of the above effects

  background
1. Background color

Parameter value range:

Block
1. Word Spacing
Word-spacing: Interval distance
2, Letter Spacing
Letter-spacing: Letter Spacing
3. Text alignment
Text-align: Parameters
Value of the parameter:
Left: Right-justified
Right: Justify
Center: Center Alignment
Justify: Relative left and right alignment
4. Vertical alignment
Vertical-align: Parameters
Top: Align Tops
Bottom: Bottom Alignment
Text-top: Align relative text top
Text-bottom: Relative text bottom Alignment
Baseline: Baseline alignment
Middle: Center Alignment
Sub: shown in the following standard form
Super: Shown in the above standard form
5. Indent text
Text-indent: Indent Distance
12px corresponds to a text distance
6, Space
White-space: Parameters
Normal OK
Pre Reserved
NoWrap No Line break
7. Display style
Display: Parameters
Parameter value range:
Blocks: block-level elements, wrap around objects
Inline: No wrapping before or after the object
List-item: Line wrapping before and after the object, adding bullets
None: No display
  Box
1, Height
2. Width
3. Padding inner margin
4. Margin margin
5. Float (float): You can have block-level elements arranged in a row, such as a landscape menu.
6. Clear Remove floating   Border
1. Style
Border Style parameter
Parameters for Border styles:
None: No Border
Dotted: Border is a point line
Dashed: borders are short and long lines
Solid: The border is a solid line
Double: border is two lines
2. Width
Border Width parameter
3. Color
Border Color parameter   List
List-style-type List Style
The list of different browsers may not be the same, may affect the page, so the list in the page is mostly the background picture display.
Control the style of the user interface   Mouse
Cursor: Mouse shape parameters
CSS Mouse shape parameter table:
Mouse Shape: CSS code

HTML Common code: Structural definitions

File type <HTML></HTML> (placed at the beginning and end of the archive)

File Subject <TITLE></TITLE> (must be placed in "header" block)

Head <HEAD></HEAD> (descriptive material, like "subject")

Stylistic <BODY></BODY> (document Ontology)

Title <H?></H?> (from 1 to 6 with six layers selected)

The alignment of the title

Distinguishing <DIV></DIV>

Differentiated Alignment <divalign=left| Right| center| Justify></div>

Citation block <BLOCKQUOTE></BLOCKQUOTE> (usually indented)

Emphasis <EM></EM> (usually in italics)

Special emphasis on <STRONG></STRONG> (usually shown in bold)

Citation <CITE></CITE> (usually shown in italics)

Code <CODE></CODE> (show original code)

Sample <SAMP></SAMP>

Keyboard input <KBD></KBD>

Variables <VAR></VAR>

Definition <DFN></DFN> (not available in some browsers)

Address <ADDRESS></ADDRESS>

Hanyu <BIG></BIG>

Small print <SMALL></SMALL>

Appearance-related labels (how the authors customize their presentation)

Bold <B></B>

Italic <I></I>

Bottom line <U></U> (some browsers are not available yet)

Strikethrough <S></S> (some browsers are not available yet)

Subscript <SUB></SUB>

Superscript <SUP></SUP>

Typewriter body <TT></TT> (single space font display)

Scheduled format <PRE></PRE> (preserves the size of the file hollow lattice)

Width of the predetermined format <pre width=?></pre> (in characters)

<CENTER></CENTER> (both text and pictures)

Shine <BLINK></BLINK> (the most derided label ever)

Font size <FONTSIZE=?></FONT> (from 1 to 7)

Change font size <FONTSIZE=+|-?></FONT>

Basic font Size <BASEFONTSIZE=?> (from 1 to 7; Default is 3)

Font Color <fontcolor= "#$$" ></FONT> ($$ as color code)

HTML Common code: Modify the usability of the page HTML code

Stickers:

Join connection: <a href= "related address to connect" > write the words you want to write </a>

Open Connection in new window: <a href= "related address" target= "_blank" > Write words to write </a>

Mobile fonts (Merry):<marquee> write the words you want to write </marquee>

Font Bold:<b> Write the words you want to write </b>

Font italic:<i> Write the words you want to write </i>

Font underline: <u> write the words you want to write </u>

Font Strikethrough: <s> write the words you want to write </s>

Font enlargement: <big> Write the words you want to write </big>

Font control size:

Change font color: <font color= "#value" > write the words you want to write </font> (where value values are between 000000 and FFFFFF (16-bit binary)

To eliminate a connection underline: <a href= "related address" style= "Text-decoration:none" > write the words you want to write </a>

Paste music: <embed src= "Music Address" width= "width" height= "height" autostart=false>

Paste Flash: <embed src= "Flash address" width= "width" height= "height" >

Video file:

Line break:<br>

Paragraph:<p> paragraph </p>

Original text style:<pre> body </pre>

Change post background: <body background= "background image Address" >

Fixed post background does not scroll with scroll bar: <body background= "background image address" body bgproperties=fixed>

Customizing posts background color: <body bgcolor= "#value" > (value values see 10)

Post background music: <bgsound= "background music address" loop=infinite>

Posted on Web: <iframe. Src= "Related Address" width= "width" height= "height" ></iframe>

Common HTML code: frequently encountered problems

Click Close Window
<a href= "Javascript.:top.window.close (); > Click Close Window </a>!

  

How do I remove the scroll bar on the right side of the homepage?
<body scroll= "No" >

<body style= "Overflow-y:hidden" >

  

How do I make a webpage close automatically.

<object id=closes type= "Application/x-oleobject" classid= "Clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11" >
<param name= "Command" value= "Close" >
</object>
<body >
This window will automatically close after 10 seconds without prompting. </body>

How do I refresh the CSS without refreshing the page?
<style>
button{color: #000000;}
</style>
<button nclick=document.stylesheets[0].rules[0].style.color= "Red" > click the button to modify the style tag directly in the button selector to change the buttons to red </button>
  

How can I make the webpage refresh automatically?
The head is credited to the <meta. http-equiv= "Refresh" c> where 20 is automatically refreshed after 20 seconds, you can change to any value.
How do I make the page refresh automatically?
Method one, with refresh

The HTML code snippet is as follows:
<meta. http-equiv= "Refresh" c>
5 indicates refresh time
[Ctrl + a All selection tips: You can modify some of the code, then press run]

Method two, using the SetTimeout control

<script>
function RL () {
Document.location.reload ()
}
SetTimeout (rl,2000)
</SCRIPT>

  

How do I make a hyperlink without underlining
Enter the following code between <HEAD>...</HEAD> in the source code:
<style. Type= "Text/css" > <!--
a {Text-decoration:none}
-</style>

  

How can I get rid of the upper and lower scroll bar of IE?
<body style= ' Overflow:scroll;overflow-y:hidden ' >
</body>

  

How can I make a RealPlayer file on a Web page to do a audition connection?
<embed height=25 src=51js.rm type=audio/x-pn-realaudio-plugin width=50 autostart= "false" c>

  

How do I use HTML to implement the function of the back button on my browser?
<a href= "Java script.:history.go ( -1)" > Click Back </a>
Or
<script> History.back () </SCRIPT>

HTML Common code: You don't necessarily know the tricks

Ncontextmenu= "Window.event.returnvalue=false" will completely shield the right mouse button
<table Borderncontextmenu=return (False) ><td>no</table> available for table

<body nselectstart= "return false" > deselect, prevent copying

Onpaste= "return false" no paste

Oncopy= "return false;" ncut= "return false;" Prevent replication

<link rel= "Shortcut icon" href= "Favicon.ico" > IE Address bar before switching to your own icon

<link rel= "Bookmark" href= "Favicon.ico" > can display your icon in the Favorites folder

<inputstyle= "ime-mode:disabled" > Close IME

Will always take the frame
<script. Language= "JavaScript" ><!--
if (window = = top) Top.location.href = "frames.htm"; Frames.htm for frames page
--></script>

Prevent people from being frame.

<script. language=javascript><!--
if (top.location! = self.location) top.location=self.location;
--></script>

Web pages will not be saved as

<noscript><iframe.src=*.html></iframe></noscript>

View Web page source code

<input type=button value= View Web page source code
onclick= "window.location =" View-source: "+" http://www.w3cschool.cn "" >

Confirm when deleting

<a href= "Javascript:if (" Do you really want to delete it? ") Location= "Boos.asp? &areyou= Delete &page=1 "" > Delete </a>

Shielding function Key Shift,alt,ctrl
<script>
function Look () {
if (Event.shiftkey)
Alert ("Disable the SHIFT key!"); /You can change to Alt CTRL
}
Document.onkeydown=look;
</script>

Web pages are not cached
<meta. http-equiv= "Pragma" content= "No-cache" >
<meta. http-equiv= "Cache-control" content= "No-cache, must-revalidate" >
<meta. http-equiv= "Expires" Content= "Wed, 1997 08:21:57 GMT" >
or <meta. http-equiv= "Expires" content= "0" >

How do I make the form feel less bumpy?
<input type=text style= "border:1 solid #000000" >
<input type=text style= "Border-left:none;border-right:none; Border-top:none; Border-bottom:1 solid#000000 "></textarea>

No scroll bars?
Let the vertical bar not:
<body style= "Overflow:scroll;overflow-y:hidden" >
</body>

Let the bars not:
<body style= "Overflow:scroll;overflow-x:hidden" >
</body>
Two of them all removed? More simple.
<body scroll= "No" >
</body>

How to get rid of the picture link click, the dotted line around the picture?

<a href= "#" nfocus= "This.blur ()" ></a>

e-mail processing submission Form

<form. Name= "Form1" method= "Post" action= "mailt****@***.com" enctype= "Text/plain" >
<input type=submit>
</form>

How do I write in the code that refreshes the parent window of the Open child window?
Window.opener.location.reload ()

How to set the size of an open page
<body nload= "Top.resizeto (300,200);" >
Open the location of the page <bodynload= "Top.moveby (300,200);" >

How to add a background image that is not full on the page, the background image does not move when pulling the page
<STYLE>
Body
{Background-image:url (logo.gif); background-repeat:no-repeat;
Background-position:center;background-attachment:fixed}
</STYLE>

Checks whether a string is entirely composed of numbers
<script. Language= "Javascript" ><!--
function Checknum (str) {return Str.match (//d/) ==null}
Alert (Checknum ("1232142141"))
Alert (Checknum ("123214214A1"))
--></script>

Get the size of a window
Document.body.clientWidth; Document.body.clientHeight

How to tell if it's a character
if (/[^/x00-/xff]/g.test (s)) alert ("contains Chinese characters");
else alert ("All characters");

TextArea the number of adaptive lines of text
<textarea Rows=1 name=s1 cols=27npropertychange= "This.style.posheight=this.scrollheight" >
</textarea>

Date minus number of days equals second date
<script. Language=javascript>
function cc (DD,DADD)
{
can add error handling
var a = new Date (DD)
A = A.valueof ()
A = A-dadd * 24 * 60 * 60 * 1000
A = new Date (a)
Alert (a.getfullyear () + "year" + (A.getmonth () + 1) + "month" + a.getdate () + "Day")
} cc ("12/23/2002", 2)
</script>

Which radio did you choose?
function Checkme ()
For each OB in Radio1
If ob.checked then Window.alert ob.value
Next
End Function
</script><BODY>
<input name= "Radio1" type= "Radio" value= "style" Checked>style.
<input name= "Radio1" type= "Radio" value= "barcode" >barcode
<input type= "button" value= "Check" nclick= "Checkme ()" >
</BODY></HTML>

Scripts never go wrong
<script. Language= "JavaScript" >
<!--Hide function killerrors () {return true;} Window.onerror = killerrors;//
</SCRIPT>

Enter key to move the cursor to the next input box
<input nkeydown= "if (event.keycode==13) event.keycode=9" >

HTML Common code integration;

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.