Tips | Web page
1. How do I define a Web page language (character set)?
In the process of making a Web page, you first define the language of the Web page so that the visitor's browser automatically sets the language, and we do not notice the problem when we use the WYSIWYG HTML tool because it is the default setting. The language you want to set can be found in the HTML code State:
<meta http-equiv= "Content Type" content= "text/html; charset=gb2312 ">
Change the charset=gb2312 to other language codes, such as English harset=en.
2. How to prevent others from putting your Web page in the frame?
Because of frame, many people put other people's web page into their own frame, make it a page of their own. If you want to prevent others from doing so, you can add the following JavaScript code, which will automatically monitor and then jump out of others ' frames.
<script language= "JavaScript" >
if (self!=top) window.top.location.replace (self.location);
</script>
3. How to set the font?
In the process of making Web pages, we all like to use beautiful fonts. However, if the visitor's browser does not have the same font installed, seeing your page will be a very common font. How do you prevent this from happening? Everyone knows that font settings are labeled fonts, and it has a face, the attribute is defined font, you can set this:, the visitor's browser will be defined in the face of the font order to set the installed font. At present, the dynamic home page has the technology to store the font information in vector format, and then use the public information base of the visitor's own machine to assemble the font quickly, so that you don't have to worry about whether the visitor has some kind of font installed.
4. How to add comments to the Web page?
In a common development web page, adding a comment is to prevent the division of work from being confused or to annotate the particular meaning of a piece of code, which is added in the following format:
<!-Web page Teaching Network forum-->.
5. How to test the browser and automatically load the required pages?
the current Microsoft and Netscape browsers are not fully compatible with all Web pages, some are very beautiful in some browsers, and are a mess when viewed in other browsers. If you need to test your browser, you can add the following JavaScript code and save a single page:
<script language= "JavaScript"
function Testbrowser () {
ie = (navigator.appname ==
"Microsoft internet explorer") &&NBSP;&&NBSP
(parseint (navigator.appversion) >= 3 ))
ns = ( navigator.appname == "Netscape") & &
(parseint (navigator.appversion) >= 3 ))
if (NS) {
settimeout (' location.href= ' nn4.htm ', ');
} else {
settimeout (' location.href= ' ie4.htm "', ten);
}
}
</script>
6. How do I make a link without underlining?
<style type= "Text/css"
<!--
a{ text-transform: none; Text-decoration: none;}
a:hover { text-decoration:underline }
//-->
</style>
7. How to add e-mail links to the Web page and display the intended theme?
<a href=mailto:tslxg@hotmail.com?subject=hello>
8. How to make the background image does not scroll
<body background= "cnshell.gif" bgproperties= "fixed" >
or CSS style sheet definition:
<style type= "Text/css" >
<!--
Body {background-image:url (image/bg.gif); background-attachment:fixed}
-->
</style>
9. How to make the background image uneven?
CSS style sheet definition:
<style type= "Text/css" >
<!--
Body {background-image:url (image/bg.gif); Background-repeat:no-repeat}
-->
</style>
10. How to define the keywords of this webpage?
Add keywords to a Web page that can be used by some search platform robots, they will use this keyword to index your site, so that when someone uses the keyword search site, if your page contains the keyword, then can be listed, define this page keyword, you can add the following code:
<meta name= "keywords" content= "html,dreamweaver,flash,css" >
Content contains the keyword, you can set it yourself.
Here's a technique where you can repeat a word so you can improve your site's ranking, such as:
<meta name= "keywords" content= "dreamweaver,dreamweaver,dreamweaver" >
11. How to link the object of this webpage?
Sometimes the link occurs in a Web page, such as the top half of the page lists the table of contents, the next section lists the content, and clicking any item in the table of contents can be skipped to the specified section, you can set the following in the content section to be linked:
<a name= "#1" ></a>
To link to the above set of sections, you can compile the following:
<a href= "Index.htm#t1" >t1</a>
12. How do I specify content for browsers that do not support frame structure?
To prevent browsers that do not support frames from accessing your Web page, add the following to your Web page:
<body>
<noframes>
This page is a frame structure, please download a new browser browsing
</noframes>
</body>
13. How do I delete a table border?
To delete a table's border, you can add a border= "0" to the table's properties.
or set the border to the following code:
<body><table border= "0" width= "100%" >
<tr>
<TD width= "100%" ></td></tr>
</table></body>
Note: (In fact, the two properties are the same)