HTML Tips Compilation _css/html

Source: Internet
Author: User
Tags time 0
1. How to define the Web 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 when we use the WYSIWYG HTML tool, we do not notice the problem because it is the default setting. The language to be set can be found in the HTML code State:



Change the charset=gb2312 to another language code, such as English harset=en.

2. How do you prevent people from putting your pages in the frame?
Because of the frame, there are many people who put other people's pages into their own frames, making them 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 someone else's frame.



3. How do I set the font?
In the process of making a Web page, everyone likes to use beautiful fonts. However, if the guest browser does not have the same font installed, it will be a very common font to see your page. How do you prevent this from happening? You know that the font setting tag is font, and it has a property that is face, which is defined by the font, you can set: The guest's browser will set the installed font in the order of the font defined by the face. The current page has a technology that can store font information in a vector format and then quickly assemble the fonts using a public repository of the guest's own machine, so you don't have to worry about whether or not a visitor has a font installed.

4. How do I add a comment to a webpage?
In co-development web pages, adding annotations is to prevent the division of labor from confusing or to comment on the special meaning of a particular piece of code, the format for adding comments is:



5. How to test the browser and automatically load the required pages?
At present, Microsoft and Netscape's browser is not fully compatible with all pages, and some in a browser is very beautiful, and other browsers to view the mess. If you need to test your browser, you can add the following JavaScript code and save a separate page:



6. How do I make the link not underline?



7. How do I add an e-mail link to a Web page and display a scheduled theme?



8. How to make the background image do not scroll


Or with a CSS style sheet definition:


9. How to make the background image uneven?
CSS style sheet definitions:


10. How do I define the keywords on this page?
Adding keywords to your Web pages can be used by some search platform bots, which use the keyword to index your site, so that when someone searches for a site with a keyword, if your page contains that keyword, you can list it, define the keyword for this page, and add the following code:

The content contains keywords that you can set yourself.
Here's a tip that you can repeat a word to improve your site's ranking, such as:


11. How do I link to an object on this page?
Sometimes links occur in a Web page, such as the top half of the page lists the table of contents, the next section lists the content, and click the table of contents any item can jump to the specified section, you can be linked to the Content section set the following way:

To link to the above settings, you can compile the following:
T1

12. How do I specify content for browsers that do not support frame structures?
To prevent browsers that do not support frames from accessing your Web pages, you can include the following in your Web page:

<noframes><BR> This page is a frame structure, please download the new browser browse <BR></noframes>


13. How do I delete a table border?
To delete a table's border, you can add a border= "0" to the properties of the table.
or set the border to the following code:




Note: (actually the two properties are the same)

14. How do I hide the link message that appears in the status bar?
You know, when you point to a link, the link information will appear in the browser status bar, if you need to hide the information, you can set the following:
Test
If you want to point to a link, a specific message appears in the browser's status bar, and change None to the text you want.

15. How do I add a multimedia file to my Web page?
Some multimedia files can be played without other programs, and many multimedia files require the help of external programs, and external programs are called when the browser downloads an unsupported format. If the browser does not install this external program, then the browser will automatically download, if you need to add multimedia format, you can set the following code:


For browsers that do not support embed tags, you can use labels instead.

16. How do I add e-mail form submissions to my Web page?
Form submission requires CGI program support, but you can also use e-mail submission, when you design the form, the action content to add an email address, as follows:



40. How to avoid the page e-mail address is searched?
Often receive unsolicited spam letters, if you have a site and post your e-mail link, then other people will use special tools to search for this address and add to their database. To prevent e-mail addresses from being searched, you can write e-mail links on the page without the standard format, for example: Cnshell at 163.com, which is equivalent to cnshell@163.com.

41. How do I add a counter to a site and set it up?
To add a counter to a site requires a third-party service, which is currently very much, while the general application of the free home space will provide counter services. The counter format is as follows:



The mid-term DD represents the counter's digital font shape, generally can choose a,b,c,d,e,f six kinds; DF indicates the record file name of the counter, usually the user name of the applicant; FT denotes the stereo effect of the font, which can be any number; The counter also contains MD (defines the maximum number of digits of the counter). Properties such as display (counter function).

42. What knowledge should you have to create a good site?
⑴html use skills, use of ⑵web graphics, ⑶javascript programming, ⑷ site layout design, ⑸ ability to manage sites, ⑹ writing capabilities, service for site content, ⑺ understanding of Web servers.

43. How do I seamlessly engage the picture with the browser window?
People sometimes find it hard to get a picture to be seamlessly bonded to a browser window border, and it's always a little distance. This is because you did not set the page margins on your pageAdd the following code:

topmargin= "0" leftmargin= "0"

TopMargin is the distance from the top of the browser window, at this point O, the picture seamlessly engages with the browser window.

leftmargin= "0" is the distance to the left of the browser window, at this time 0.

44. How to build a site search engine system?
If your site has a lot of content, you want visitors to quickly find the information he wants. Then you need to build a search engine. Connect to the Website network Special Zone http://netzone.swatou.com/personal/, click "Apply for Site engine" and fill out the application form, then follow the requirements to establish the Site page database.

45. How can I get text and images to live peacefully?
If you have a long text and indent the text in the middle of the page, you want to place several pictures around the text, how do you do that? Suppose you're using FrontPage98 to edit a page, first set up the text, then create a single-line table where you need to place the picture, drag it to the minimum with the mouse, select the table properties, set the float to right (that is, put it to the left of the text), and click OK. At this point, the table is at the right of the text, and finally put the picture in the table, remember to cancel the table border.

46. How do I change the link color?
To change the link color, clickLink is not a linked color, vlink is a linked color, and ALink is an over-linked color.

47. How do I get visitors to ignore the buffer page?
Please check thePartially added

48. How do I create a slideshow effect for my page?
If you want to show a series of pictures for a visitor, and the page automatically refreshes the picture every time interval. Suppose you want to show third officer pictures, make three page 1.htm,2.htm,3.htm for these three pictures. On each pageParts were added separately , where 1.htm points to 2.htm,2.htm and points to 3.htm.

49. How do I upload a page correctly?
Server default home name is what, currently more than index.htm or Default.htm.
If you need to set up directory public_html, some servers need to set up the directory and upload all the pages to the directory, and some only need to upload directly to the root directory (/).
Whether the server supports Chinese file names (users who like to use Chinese filenames should note).
The server is sensitive to the English case of the file, the author suggests that it is best to use lowercase English.
Check that the user name and password are correct.

50. How do I add text hints to text links?
We can generally add text hints to the picture, that is, how to alt= the text link to add text hint, just add the title tag in. Yu Feng Multimedia interactive

51. How do I change the text of the form Submit button?
Change the Value property in the code below to the text you want.



52. How do I pinpoint images in IE4 and NN4 browsers?]
The exact placement of the image requires the help of CSS (cascading style sheets), as follows:

<title>Cnshell</title>








Adjust the value of the top,left to position the image precisely.

53. How to speed up the page image download?
There is a situation, home image too little, and other page pictures too much, in order to improve efficiency, when visitors browse the homepage, the background of other pages of the picture download. The method is to add: in the homepage, where width,height to be set to 0,cnshell.jpg for the pre-downloaded picture name.

54. How do I automatically pop up a dialog box?
InPartially added



55. What is the target window and how is it set?
The target window is the window that the page link refers to, that is, when you click a link in the page, the link refers to the content that appears in that window. In most cases, we don't have to care about it because it's usually displayed in the same window.

Target is the property of the link tag, which is the purpose of specifying the target window, and the target has several values:

_self-loading a link to a window or frame in the current page

_top-completely replaces all frames of the current page

_blank-Open a new window for the content that the link points to

_parent-to load the contents of the link into the current pageIn the parent window

The above settings are used more in the frame structure pages.

56. How do I specify the same target window for all links?
In the framework page structure, we need to specify what the link is pointing to in that window. If most of your links are assigned to the same window, you cansection, add: , you don't need to specify a window for each link.

57. How do I make all of my pages share the same cascading style sheet (CSS)?
On each page of thesection, add the following code:



Where Cnshell.css is a shared cascading style sheet file that can be written using the text Editing tool, which should contain similar code such as the following:



58. How do I customize a new window for a link?
We can open a new window to show the contents of the link, but how to customize the new window.

Just add the onclick event to the label:

Question

"#" means that after clicking the link "question and answer", the current window remains the same, cnshell.htm the contents of the new window opened after clicking the link "question and answer", and scrollbars=yes,resizable=yes,width=500,height= 40 sets properties such as the size of the new window.

59. How do I test a page without installing more browsers?
The current incompatibility, so that the same page in different browsers display is not the same, how to make everyone satisfied, in the absence of more than the type of browser installed, you need to close the image, JavaScript support, CSS support and so on, Because most of the low-version browsers don't support them, viewing can let you know how "ugly" the page is.

60. What are the steps to make a dynamic page?
The first step: Design the page and find the materials required for the page; the second step: complete the production of ordinary pages, there is no need to involve dynamic homepage content; The third step: Add cascading Style Sheets for page text to change text color, link, etc. fourth step: Add interactive content to the page, such as Cgi,javascirpt, ActiveX controls, etc., this is the key to the dynamic of the page; Fifth step: Test the dynamic page to fit more browsers; Step Sixth: Publish the dynamic page and indicate that the page is a dynamic page (DHTML).

61. How do I get visitors to click Join site bookmarks?
Always want visitors to be able to add your site to their bookmarks, here is a good way:

InPartial join:



And then inPartial join:



62. Is it possible to write HTML tag elements using uppercase bodies?
For most HTML tag elements, you can use uppercase or lowercase bodies and a mixture of both to write tag elements. Like what:

AndEqually effective.

But if it is a LABEL element of a special character, you can only use the lowercase body. For example, the copyright character of the label element is:?, if written?;, then the page will be fully displayed?;.

63. How can I close the Browse window by clicking on the page?
Insection, add the following code:

Close window

64. How do I set the access password for my page?
Sometimes you need to set a password for a page in order for the right person to come in. In the


In the above code, "Cnshell" is the correct password. "Cnshell.htm" is the page that is linked when the correct password is entered. This method of setting the password is not secure because the visitor can know the password if it is viewed from the source code of the page.

65. How do I set up the correct software download link for my visitors?
As with other links, labels are used. But for software download links, you need to set this up:

Download Cnshell.zip (188KB)

66. How do I delete the blue border of a picture link?
If we set the picture as a link, we'll see a blue border around the picture. To delete a border, add border= "0" to the picture label. Such as:

67. How do I provide a button for a link?


68. How do I add a counter to a page?
The problem is really a headache for people who are on the internet, because they find that using FrontPage98 to increase the counter, they find that it doesn't work at all. The counter requires server CGI support and cannot be set by the local computer itself. So, if your site needs counters, please go to the following most famous counter provider application: http://www.linkexchange.com/

69. How do I know the traffic to the site to get there?
If you have the management of the site server, then this is a very simple problem, check the server log can be. But you don't have that right at the moment, but you can provide traffic data from third parties. Easy count is a good choice, link to the site http://best.netease.com/application, and then add the code to the page. When you want to know the traffic, click the Easy Number icon, on the statistics page, click Analyze.

70. How do I make my browser display Word file format correctly?
In order to correctly handle formatting such as word, you need to set the file type in the HTML file, for example:



There are other file types that are often set:

Application/msword Microsoft Word Document application/pdf PDF documentapplication/wordperfect6.0 WordPerfect 6.0 Documentapplication/zip zip archiveaudio/x-wav wav Audio Formataudio/midi MIDI audio Formataudio/x-pn-realaudio Realaudioimage/gif gif image formatimage/jpeg JPEG image formatimage/png PNG image formattext/html HTML Documenttext/plai n Plain textvideo/mpeg MPEG video formatvideo/quicktime QuickTime video formatvideo/x-msvideo AVI video format

71. How do I know if my images are being used by other websites?
If you have a unique name for the image of your site, it is not easy to duplicate names, such as tt124.jpg. Then link to site: http://www.altavista.com/, Enter Tt124.jpg in the search field and start looking for a site that will be listed if a tt124.jpg image is used. AltaVista search engine is a robot search for the main site, its robot will keep the entire Web page indexed, so you can find anything related to you, put your name pinyin input to see, find what.

72. How do I indent text passages?
InPartial join:

P {text-indent:1%}

The P tag is the label for the paragraph of the HTML text, and 1% is the indented range.

73. How to use the divider line correctly?
If you use FrongPage98, here I assume you need to separate the left and right parts of the page, first use the Table tool to drag out three rows of the table, the content is placed in the left and right two units, and then the middle of the unit width of 1 pixels, and fill in the desired color. You also need to set all the table and unit size units to pixels.

74. How do I click the link to open a custom new window?
First inSection Add code:



Then add the following code to the link tag:

Yu Feng Multimedia

75. Why are some site downloads slow?
Because the Web page with too many pictures, in order to pursue cool effect with a large number of Java applets, too much use







Computer World News
Web page Making FAQs


























Switch
















































































































































  • , these are not advisable. For the image must be used for compression and reuse, for Java applets absolutely no, it will make the machine configuration of low-profile visitors hard to read. For dynamic pages that you need, you can use CSS and JavaScript implementations.76. How to make the font display more comfortable?This requires the use of CSS (cascading style sheets), the current conventional font is: {font-family: Arial (GB); font-size:9pt; line-height:16px}, add this code toBetween. Such as: font-family: Arial (GB) is the font that is set; font-size:9pt is the size of the font; LINE-HEIGHT:16PX is the upper and lower spacing of lines of text.77. How to make Web pages compatible with IE and nn two browsers?Full compatibility is not possible. At present, IE browser occupies much more than nn browser, so you only need to be compatible with IE browser. Of course, you can also make two sets of pages, using JavaScript to detect different browsers to load the page.78. How do I use fonts correctly?Setting the text font is a very important part of Web page making, but since not every visitor has the font you set, try to use the default font of the operating system, Arial, boldface, italic. For other types of fonts can be implemented graphically.79. How to make a traditional version of the Web page?If you use E-port's Web Workshop tool to make pages, you can use the GB to BIG5 under the Tools menu to turn the simplified pages into traditional pages. If you use other tools can also use the Web Workshop GB conversion BIG5 to make traditional Web pages, using the Web Workshop to open the page, click on the tool menu of the GB to BIG5 conversion page and save. It is important to note that you need to put the originalChange the charset=gb2312 to Charset=big5 so that the visitor's browser is automatically recognized. (E-port's Web Workshop download address: http://e-port.soim.net/)80. Use horizontal line (HR) to make vertical lines?Inserting HR is simple:。 How to make it perpendicular, more simple: 81. What do I need to exchange connections with other sites?Of course, you must first have a personal site, and then prepare two site logo. In general, 400x40 and 88x31 Two kinds of logo is required, others can also prepare a 100x31 logo. 400X40 's logo is used for ad Exchange sites like the Internet Alliance, where 88x31 and 100x31 are used for exchange between personal sites.82. How do I get a link from the drop-down menu to open a new window?Set the drop-down menu first, such as: Then putCan.83. How to correctly align the correct alignment? TopSometimes we need to specify the left and right margins (the distance from the text to the browser) for a piece of text so that the text is aligned correctly, and CSS (cascading style sheets) provides such functionality:InJoin in The. TT is the class name so that you should have it in the HTML tag. And the attributes in {} are the distance from the left, right, top, and bottom of the margin, respectively. When the margins are equal, such as 60px, you can abbreviate:. tt {margin:60px}.When the CSS is referenced in the text, you will find that the text pairs are very neat.84. How do I use the image format correctly?The current picture on the web is in the standard format JPG and GIF. When the color of the picture is a lot, choose JPG, it's compression ratio, and GIF is suitable for a few color images.85. How do I display visitor system information on a Web page?Add the following code to the: 86. How do I correctly place JavaScript?JavaScript is an implementation tool for dynamic home pages, where JavaScript is typically placed inOrBetween. For placed inBetween the JavaScript, you need to put it in the right place. If you use the FrontPage98 tool, first move the cursor to where you want to place the JavaScript, and then select Insert/advanced/script to enter JavaScript in the Open text box so that it is ready to be placed. Preview the page where JavaScript appears where you put it. You can also place JavaScript in a table so that you can pinpoint it.87. What are the interactive functions required for personal sites?Interaction is the charm of the web, and as a personal site, these interactive tools are needed to communicate with visitors at any time. Here are the interactive tools that are currently required for personal sites:Message board-let visitors give your site a comment;Forum-A discussion of a particular topic, the difference between it and the message board is that the message board can contain any content;Survey form-Using a personal site, you can investigate a problem and see the support rate for each opinion;Subscription form-provides the subscriber with updated information about the site by mail;Chat room-An instant conversation place where you can organize a network discussion on a particular topic;Search engine-When the site is too much content, the search engine allows visitors to quickly find what they want to see;88. How do I indent text passages?InPartial join:p {text-indent:1%}P tag is the label of the HTML text paragraph, 1% is the range of indentation89. How do i click on a link and change it within two frames?For a page composed of Topframe, Leftframe, MainFrame, if you want to click the link in the Leftframe and change within the other two frames, the code is as follows: 90. Forward, rewind, and RefreshBack offForwardRefresh91. Print button 92. View the Source button 93. How do I remove the page scroll bar?Add the style sheet control to the body with the following code: 94. How do I insert spaces in dreamweaver?In FrontPage, inserting spaces only requires the keyboard spacebar to be pressed before the selected text, but not in Dreamweaver. The label of the space is the ability to open the HTML Source window directly into the tag, or you can press Ctrl+shift+space before the specified text.95. How to set the background transparency of Flash animation in DW?In the Properties panel of the SWF file, point parameters, add parameter wmode, value select transparent;or directly modify the code of the page, in the flag SWF file properties of the code to add: 96. How to use the divider line correctly?Here I assume that you need to separate the left and right parts of the page, first use the Table tool to drag out three rows of table, the content is placed in the left and right two units, and then the middle of the unit width of 1 pixels (pixels), and fill in the desired color. You also need to set all the table and unit size units to pixels.97. How do I make my browser display Word file format correctly?In order to correctly handle formatting such as word, you need to set the file type in the HTML file, for example: There are other file types that are often set:Application/msword Microsoft Word DocumentApplication/pdf PDF Documentapplication/wordperfect6.0 WordPerfect 6.0 DocumentApplication/zip Zip archiveAudio/x-wav WAV Audio formatAudio/midi MIDI Audio formatAudio/x-pn-realaudio RealAudioImage/gif GIF image formatImage/jpeg JPEG image formatImage/png PNG image formatText/html HTML DocumentText/plain Plain TextVIDEO/MPEG MPEG Video FormatVideo/quicktime QuickTime Video FormatVideo/x-msvideo AVI Video Format98. How to implement a page two color link changes?Set different class classes in CSS, as shown in the following example:A.r:link{text-decoration:none;color: #000066}A.r:visited{text-decoration:none;color: #333333}A.r:hover{color: #0000ff; Text-decoration:underline}A.r1:link{text-decoration:none;color: #000066; Font-weight:bold}A.r1:visited{text-decoration:none;color: #000066; Font-weight:bold}A.r1:hover{color: #FF0000; Font-weight:bold}A.r2:link{text-decoration:none;color: #ffffff}A.r2:visited{text-decoration:none;color: #ffffff}A.r2:hover{color: #000000;}How to accurately locate layers in 99.DW?For now, there is no good way to achieve very precise positioning so that the layer in the editing and browsing position unchanged, even using the "ruler" and "grid" auxiliary positioning, there will still be a difference, and in IE and NC display the location of the layer will be biased, about 3 pixels deviation. The best way is to adjust the position of the layer against the display of the browser.100. How to save the background music on someone else's Web page?A: After browsing the webpage, you can find the cached file of the background music under your Windows\Temporary Internet files folder and copy it to use. If you still can't find the file, you can open the source file of the webpage, find the URL path of the music file, and download it with the FTP software such as "ant".101. Avoid someone entering the site directly from the frame of your frame, rather than from index.htm?A: The page in the frameAdd the following script code between: This way, when someone enters the site from the frame, it is automatically redirected to the home page file index.htm.Some of the shortcut keys for 102.ie5.0:A: Open Find function: ctrl+fClose the browser window: ctrl+wOpen the Address bar drop-down list box: F4Refresh: F5Save the current Web page to your Favorites list: Ctrl+dOpen a copy of the current IE window: CTRL + NStop downloading the current page: ESCThe cursor moves quickly to the beginning of the page: HomeThe cursor moves quickly to the End of the page:Open the new Address Type window: Ctrl+oOpen Favorite folder: Ctrl+iOpen History folder: Ctrl+hOpen the default home page for your browser settings: Alt+home103. How to make the Web page in different resolution full screen?Use the table (do not use the layer), do the content, the outer table is set to a width of 100%, and then adjust appropriately.104. How do I close a webpage regularly?Join in the head area Indicates that the window is automatically closed after two seconds.105. How to implement without prompting, close the window directly?Direct close without any hintContentA prompt box shows whether to confirm the shutdownClose window
    Related Article

    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.