What are the special effects codes for html web pages?
html Web page special effects codes include: 1. Bold font [xx]; 2. Italic font [xx]; 3. Font size control [
xx
]; 4. Change the post background []; 5. Texture [![]()
The operating environment of this tutorial: windows7 system, html5 version, DELL G3 computer.
html web page special effects codes are:
1) Texture:
<img src="图片地址">
2) Join the link:
<a href="所要连接的相关地址">写上你想写的字</a>
3) In Open the connection in a new window:
<a href="相关地址" target="_blank">写上要写的字</a>
Remove the underline of the connection and open the connection in a new window:
<a href="相关地址" style="text-decoration:none" target="_blank">写上你想写的字</a>
4) Move the font (marquee):
<marquee>写上你想写的字</marquee>
5) Make the font bold:
<b>写上你想写的字</b>
6) Font italics:
<i>写上你想写的字</i>
7) Font underline:
<u>写上你想写的字</u>
8) Font strikethrough:
<s>写上你想写的字</s>
9) Font enlargement:
<big>写上你想写的字</big>
10) Font control size:
<h1>写上你想写的字</h1>
(The font size can be from h1-h5, h1 is the largest, h5 is the smallest)
11) Change the font color :
<font color="#value">写上你想写的字</font>
(The value is between 000000 and ffffff (16-digit)
12) Remove the connecting underline:
<a href="相关地址" style="text-decoration:none">写上你想写的字</a>
13) Post Music:
<embed src=音乐地址 width=300 height=45 type=audio/mpeg autostart="false">
14) Post flash:
<embed src="flash地址" width="宽度" height="高度">
15) Post video files:
<img dynsrc="文件地址" width="宽度" height="高度" start=mouseover>
16) Line break: <br>
17) Paragraph:
<p>段落</p>
18) Original text style:
<pre class="brush:php;toolbar:false">正文
19) Change post background:
<body background="背景图片地址">
20) Fixed post background not scrolling with the scroll bar :
<body background="背景图片地址" body bgproperties=fixed>
21) Customize post background color:
(see value 10)22) Post background music:
23) Post the web page:
HTML special effects code 1. Ignore the right click
<body oncontextmenu="return false">
or
<body style="overflow-y:hidden">
2. Add background music
IE:<bgsound src="*.mid" loop=infinite> NS:<embed src="*.mid" autostart=true hidden=true loop=true> </embed> *.mid你的背景音乐的midi格式文件
3. Simple window.open method
<a href="#" onclick="javascript :window.open(文件路径/文件名,newwindow, toolbar=no,scrollbars=yes,resizable=no,top=0,left=0, width=400,height=300);">文字或图片</a>
Parameter explanation:
End of js script
4. Simple page encryption
<script LANGUAGE="javascript"> <!-- function loopy(){ var sWord =""; while(sWord!="login"){sWord=prompt("请输入你的登陆密码");} alert("登陆成功!"); } loopy() //--> </script>
5. The background image does not move when the page is pulled
<style> body{background-image:url(logo.gif); background-repeat:no-repeat;background-position:center} </style>
6. Let the browser Failed to save when saving the page
<NOSCRIPT><iframe src="*.html"></iframe></NOSCRIPT>
7. Randomly replace pictures
<script> document.write(<img src="img/+parseInt(Math.random()*(5)) +.gif"height="40" width="50"> </script>
The picture file name is 0.gif 1.gif 2.gif 3.gif 4.gif
8 . The window is closed regularly
First add the following code to the area of the web page file:
<script language="javascript"> function closeit() { setTimeout("self.close()",10000) //毫秒 } </script>
Then add within the
tag such as:9. The webpage automatically closes
<html> <head> <object id=closes type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"> <param name="Command" value="Close"> </object> </head> <body onload="window.setTimeout(closes.Click(),10000)"> 这个窗口会在10秒过后自动关闭,而且不会出现提示. </body> </html>
10. The webpage automatically refreshes
Enter
<META HTTP-EQUIV="Refresh" content="20">
in the head section, where 20 means automatic refresh after 20 seconds. You can change it to any value.
11. Automatic page rotation
<META HTTP-EQUIV="Refresh" CONTENT="时间(秒);URL=地址">
12. Keep layer at the front and not covered by Iframe or Object
Insert Iframe or Object settings in Layer z-Index value
<div z-Index:2><object xxx></object> # 前面 <div z-Index:1><object xxx></object> # 后面 <div id="Layer2" style="position:absolute; top:40;width:400px; height:95px;z-index:2"> height=100% width=100%> <iframe width=0 height=0></iframe> </div> <div id="Layer1" style="position:absolute; top:50;width:200px; height:115px;z-index:1"> <iframe height=100% width=100%></iframe> </div>
13. Return to the previous page
<a href=javascript :history.back(1)>『返回上一页』</a>
14. Close the window
<a href=javascript :self.close()>『关闭窗口』</a>
15. About the transparent background of iframe
<IFRAME ID="iFrame1" SRC="iframe.htm" allowTransparency="true" style="</IFRAME>
16 . oncontextmenu="window.event.returnValue=false" will completely block the right mouse button
<table border oncontextmenu=return(false)><td>no</table>
Can be used in Table
17.
<body onselectstart="return false">
Cancel selection and prevent copying
18.
onpaste="return false"
No pasting
19.
oncopy="return false;" oncut="return false;"
Prevent copying<br>
Related learning recommendations: html tutorial
The above is the detailed content of What are the special effects codes for html web pages?. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

It is a block-level element, used to divide large block content areas; it is an inline element, suitable for wrapping small segments of text or content fragments. The specific differences are as follows: 1. Exclusively occupy a row, width and height, inner and outer margins can be set, which are often used in layout structures such as headers, sidebars, etc.; 2. Do not wrap lines, only occupy the content width, and are used for local style control such as discoloration, bolding, etc.; 3. In terms of usage scenarios, it is suitable for the layout and structure organization of the overall area, and is used for small-scale style adjustments that do not affect the overall layout; 4. When nesting, it can contain any elements, and block-level elements should not be nested inside.

To correctly set the character encoding of the HTML document to UTF-8, you need to follow three steps: 1. Add at the top of the HTML5 part; 2. Configure the response header Content-Type: text/html; charset=UTF-8, if Apache uses AddDefaultCharsetUTF-8, Nginx uses charsetutf-8; 3. Select the UTF-8 encoding format when saving HTML files in the editor. These three links are indispensable, otherwise it may lead to garbled page code and failure of special character parsing, affecting user experience and SEO effect. It is important to ensure that HTML declaration, server configuration and file saving are consistent.

To get started with HTML quickly, you only need to master a few basic tags to build a web skeleton. 1. The page structure is essential, and, which is the root element, contains meta information, and is the content display area. 2. Use the title. The higher the level, the smaller the number. Use tags to segment the text to avoid skipping the level. 3. The link uses tags and matches the href attributes, and the image uses tags and contains src and alt attributes. 4. The list is divided into unordered lists and ordered lists. Each entry is represented and must be nested in the list. 5. Beginners don’t have to force memorize all tags. It is more efficient to write and check them while you are writing. Master the structure, text, links, pictures and lists to create basic web pages.

ShadowDOM is a technology used in web component technology to create isolated DOM subtrees. 1. It allows the mount of an independent DOM structure on ordinary HTML elements, with its own styles and behaviors, and does not affect the main document; 2. Created through JavaScript, such as using the attachShadow method and setting the mode to open; 3. When used in combination with HTML, it has three major features: clear structure, style isolation and content projection (slot); 4. Notes include complex debugging, style scope control, performance overhead and framework compatibility issues. In short, ShadowDOM provides native encapsulation capabilities for building reusable and non-polluting UI components.

Image not displayed is usually caused by a wrong file path, incorrect file name or extension, HTML syntax issues, or browser cache. 1. Make sure that the src path is consistent with the actual location of the file and use the correct relative path; 2. Check whether the file name case and extension match exactly, and verify whether the image can be loaded by directly entering the URL; 3. Check whether the img tag syntax is correct, ensure that there are no redundant characters and the alt attribute value is appropriate; 4. Try to force refresh the page, clear the cache, or use incognito mode to eliminate cache interference. Troubleshooting in this order can solve most HTML image display problems.

The style placement method needs to be selected according to the scene. 1. Inline is suitable for temporary modification of single elements or dynamic JS control, such as the button color changes with operation; 2. Internal CSS is suitable for projects with few pages and simple structure, which is convenient for centralized management of styles, such as basic style settings of login pages; 3. Priority is given to reuse, maintenance and performance, and it is better to split external link CSS files for large projects.

❌Youcannotnesttagsinsideanothertagbecauseit’sinvalidHTML;browsersautomaticallyclosethefirstbeforeopeningthenext,resultinginseparateparagraphs.✅Instead,useinlineelementslike,,orforstylingwithinaparagraph,orblockcontainerslikeortogroupmultipleparagraph

Pre-resolving DNS can speed up page loading speed, and using HTML link tags for DNS pre-resolving is an effective method; DNSPrefetching saves subsequent request time by resolving domain names in advance; applicable scenarios include third-party fonts, advertising statistics scripts, resource hosting and CDN domain names; it is recommended to prioritize the main page dependency resources, reasonably control the number between 3 and 5, and use it with preconnect to better effect.
