Common code for Web pages

Source: Internet
Author: User

Web page making common code (text color/font/Insert Picture/flash, etc.)


One: color code If you want to use a color, get its color value. For example, if you want to change the color of some text, you can use the following code: <font color= #ffc060 size=2> Change the code after the # symbol to change the color </font>

000080 TD bgcolor= "#000080" >
000000 000020 000040 000060 0000a0 0000c0 0000ff
008080 TD bgcolor= "#008080" >
008000 008020 008040 008060 0080a0 0080c0 0080ff
00ff80 TD bgcolor= "#00ff80" >
00ff00 00ff20 00ff40 00ff60 00ffa0 00ffc0 00ffff
c00080 TD bgcolor= "#c00080" >
c00000 c00020 c00040 c00060 c000a0 c000c0 c000ff

ff0000

ff0020

ff0040

ff0060

ff0080

Ff00a0

Ff00c0

Ff00ff

Two: The text bold italic code The text bold code is: <b> Hello </b> text italic code is: <i> Hello! </i> Bottom Line Word:<u></u>

Three: Text link code If you want to click on one of the text will connect to another page effect, this is the hyperlink, the code is like this:
<a href= "website address";> shared space </a> if you want to reopen a window after the text, the code is: <a href= "website address"; target= "_blank" > Shared space </a>

Four: The code to put the picture on the website If you see a nice picture that you want to put on the website, the code is this:

The number behind adjusts the size of the picture.

Five: Image link code If you want to open a Web site, the link code is like this:
<a href= "http://www.163.com"; ></a>
If you have a single point, you can open a link to a Web site and reopen a window. The code is this:
<a href= "http://www.163.com"; target= "_blank" ></a> the above figures can adjust the size of the picture.

Six: Line break code If you want to change lines, it is not possible to use the ENTER key directly, you need to enter the position where you want to break the line <br>
, this will be divided into two lines, the whole site will not look like a large, but the paragraph is clear.

Seven: The code to move the text is <marquee> Write text here </marquee>

Move around <marquee behavior=alternate>, I go back and forth! </marquee>

Text moves up:

< MARQUEE scrollamount=1 direction=up behavior=alternate height=260><marquee scrollamount=1 direction=up height= 150>
Text
</marquee></marquee>

Eight: Move the code of the picture <marquee><marquee>
You can change the image address into your own. To put a picture on it, insert it in the middle by the format:

The picture address inside is determined by itself.

Nine: code for background music < Bgsound src= "http://www.midifan.com/midi/music.asp?id=3073";loop=30> Inside the background music address you can replace yourself.
Front is the music address, usually ending in mid or MP3. The number that follows is the number of plays.
http://www.midifan.com/midi/
This site has good background music

10: The code that inserts a flash animation in the website is <embed width=200 height=200
Src= "Http://flash.shangdu.com/view/2/fff";> inside the animation address for your. The animation address is the end of the form. This should be noted.

11: The Welcome Word code that appears when you open a website
<body onload= alert ("Hello, welcome to visit this website!") ") >

12: When the website is closed
<body onunload= "Window.alert (\ ') Thank you for your visit, invite to join. Please remember this site domain name:http://www.yz126.com/ Webmaster mailbox:* * * * @yahoo. com.cn welcome consultation \ ') ' >

13: Open a Web site when you make a pop-up window ads
<script language= "JavaScript" >
var timerid=1;
window.open (\ 'http://163.com&/#39;, \ ' \ ', \ ' width=600,height=300,left=100,top=50\ ');
</script>
Inside the http://163.com/

14: Mouse-induced font Red code is as follows: inserted between <body></body>

<style TYPE=TEXT/CSS>TD {
font-size:12px
}
BODY {
font-size:12px
}
INPUT {
font-size:12px
}
a:link {
COLOR: #000000; Text-decoration:none
}
a:visited {
COLOR: #000000; Text-decoration:none
}
a:active {
Color:blue; Text-decoration:none
}
a:hover {
color:red; Text-decoration:underline
}. So {
BORDER-RIGHT:1PX Ridge; Border-top: #ffffff 1px Ridge; font-size:12px; Border-left: #ffffff 1px Ridge; BORDER-BOTTOM:1PX Ridge; Background-color: #cccccc
}
</STYLE>

XV: Prohibit others from copying your page's code:

<body bgcolor= "#ffffff" oncontextmenu= "return false" onselectstart= "return false" >

16: Put other pages into the code on your own page:

<iframe name=smjh align=center src= "Here's the URL you want to put in the website" frameborder=0 width=760 scrolling=no height=300></iframe >

1>. the code that keeps the background fixed

<body bgproperties= "fixed" >

2>. inserting transparent Flash code
<embed src= "Place flash address here";; Width= "height=" "quality=" "High" wmode= "Transparent" align= "right" style= "position:absolute; left:92; Top:0 ">

3>. make page not scroll bar
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>

Get rid of all two.

<body scroll= "No" >
</body>

4>. Add music code

①. For Infinite Cycles


<bgsound src= "Music Address" loop= "-1" >



②. Play the background music immediately


This effect can make different concerts played on the homepage.

<script language= "JavaScript" >
<!--
var sound1= "Music Address 1"
var sound2= "Music Address 2"
var sound3= "Music Address 3"
var sound4= "Music Address 4"
var sound5= "Music Address 5"
var sound6= "Music Address 6"
var sound7= "Music Address 7"
var sound8= "Music Address 8"
var sound9= "Music Address 9"
var sound10= "Music Address 10"
var x=math.round (Math.random () *9)
if (x==0) x=sound1
else if (x==1) x=sound2
else if (x==2) X=sound3
else if (x==3) X=sound4
else if (x==4) X=sound5
else if (x==5) X=sound6
else if (x==6) X=sound7
else if (x==7) X=sound8
else if (x==8) x=sound9
else X=SOUND10
if (navigator.appname== "Microsoft Internet Explorer")
document.write (' <bgsound src= ' + ' "' +x+ '" ' + ' loop= "infinite" > ')
Else
document.write (' <embed src= ' + ' "' +x+ '" ' + ' hidden= "true" border= "0" width= "" height= "+" autostart= "true" loop= " True ">")


-

5>. Remove the underline from the hyperlink
Copy the following code between
<!--
A:link{text-decoration:none}
A:visited{text-decoration:none}
a:hover {color: #00ffff; Text-decoration:underline}
-
</style>


Color scroll bar:

<style type=text/css>
Body
{
Scrollbar-face-color: #b5daff;
Scrollbar-highlight-color: #ffffff;
Scrollbar-shadow-color: #000000;
Scrollbar-arrow-color: #0000ff;
Scrollbar-base-color: #6699ff;
Scrollbar-dark-shadow-color: #6699ff;
}
</STYLE>


Remove the underline from the hyperlink:

Plugged in between <body></body>

<style type=text/css>
<!-
A:link{text-decoration:none}
A:hover{text-decoration:none}
A:visited{text-decoration:none}
-
</STYLE>

Hyperlink background Color

<!--one step to installing this script-->

<!--1) Copy everything below, and paste in HEAD section of page-->

<style>

<!--

a:hover {background-color: #FFFF00;}

-

</style>

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.