Common CSS properties and values_html/css_WEB-ITnose
Download high-resolution images: css common attributes and values (mind map summary)
1. Font
<title>font</title> <style> h1{ font-family:times,courter; font-size:150% font-style:italic; font-variant:normal; font-weight:normal; } h2{ font-family:serif,times; font-size:1cm; font-style:normal; font-variant:small-caps; font-weight:900; } p{ font:oblique small-caps bold 1cm sans-serif; } </style> <h1 id="this-is-header-one">this is header one</h1> <h2 id="this-is-header-two">this is header two</h2> <p>this is a paragraph </p>
Running results:
2. Text
<title>text</title> <style> h1{ letter-spacing:-3px; text-align:right; text-decoration:overline; } h2{ letter-spacing:0.5cm; text-align:center; text-decoration:line-through; } p{ text-align:left; text-decoration:underline; text-indent:1cm; text-transform:lowercase; } a{ /*去掉链接下划线*/ text-decoration:none; text-indent:0.8cm; text-transform:uppercase; } </style> <h1 id="this-is-header-one">this is header one</h1> <h2 id="this-is-header-two">this is header two</h2> <p>this is a paragraph </p> <a href="http://www.baidu.com">baidu</a>
Running results:
3. Background
Because the blogger was too lazy to find the background material, after running it, it was ugly to the eye, but there is nothing wrong with the key points. Please pay attention to the code. The corresponding effect is just fine.
<title>background</title> <style> body{ background-color:yellow; background-image:url(a.png); background-repeat:repeat; background-attachment:fixed; } h1{ background-color:green; background-image:url(bb.png); background-repeat:repeat-x; background-position:bottom; } h2{ background-color:blue; } p{ background-image:url(bb.png); background-repeat:no-repeat; height:100px; background-position:center; } a{ background:red url(bb.png) no-repeat left center; padding:10px; }b </style> <h1 id="this-is-header-one">this is header one</h1> <h2 id="this-is-header-two">this is header two</h2> <p>this is a paragraph </p> <a href="http://www.baidu.com">aaaaaaaaaaaaaaaaa</a>
Running results:
This screenshot looks a bit messy, but according to the code The results are found very quickly. It is easy to understand the meaning of each code. The url is the path you add casually, so you don’t need to worry about it.
4. Border (PS: Add a few sentences about the mouse pointer code)
<title>border</title> <style> div{ width:80px; height:25px; border-style:solid dotted; cursor:move; } h1{ border-style:solid double dashed inset; border-top-style:solid; border-right-style:double; border-bottom-style:dashed; border-left-style:inset; border-width:1px 2px 3px 4px; /* 设置边框第二种方式: border-top-width:1px; border-right-width:2px; border-bottom-width:3px; border-left-width:4px; */ border-color:red yellow green blue; cursor:wait; } h2{ border:3px solid green; /*会覆盖上面的border设置*/ border:1px dashed red; cursor:pointer; } </style> <div> aaaaaa </div> <h1 id="this-is-header-one">this is header one</h1> <h2 id="this-is-header-two">this is header two</h2>
Running results:
When the mouse moves over the three borders, the mouse pointer will change accordingly: it will become moving, waiting, and small hand states respectively. Please refer to the code in the
5. List
<title>list</title> <style> </style>
- aaaaaaaaaaaaa
- aaaaaaaaaaaaa
- aaaaaaaaaaaaa
- aaaaaaaaaaaaa
- aaaaaaaaaaaaa
- aaaaaaaaaaaaa
- aaaaaaaaaaaaa
- aaaaaaaaaaaaa
- aaaaaaaaaaaaa
- aaaaaaaaaaaaa
- aaaaaaaaaaaaa
- aaaaaaaaaaaaa
Running results:
Screenshot The two lists displayed are an unordered list and an ordered list.
But in future development, we will basically not use the default images, but the images at the front of the custom list. style="list-style-type:none. This code sets the symbol style before the list to empty, and then we can add the images we need.
document.body.oncopy=function(){
event.returnValue=false;
var t=document.selection.createRange().text;
l4ever = parent.document.location;
var s=”Source of this article: Li Shuo’s column”;
var y=”Original address:” http://blog.csdn.net/wzqnls ”;
clipboardData.setData('Text', ” t 'rn' s 'rn' y ”);
}

The roles of HTML, CSS and JavaScript in web development are: 1. HTML is used to build web page structure; 2. CSS is used to beautify the appearance of web pages; 3. JavaScript is used to achieve dynamic interaction. Through tags, styles and scripts, these three together build the core functions of modern web pages.

Setting the lang attributes of a tag is a key step in optimizing web accessibility and SEO. 1) Set the lang attribute in the tag, such as. 2) In multilingual content, set lang attributes for different language parts, such as. 3) Use language codes that comply with ISO639-1 standards, such as "en", "fr", "zh", etc. Correctly setting the lang attribute can improve the accessibility of web pages and search engine rankings.

HTMLattributesareessentialforenhancingwebelements'functionalityandappearance.Theyaddinformationtodefinebehavior,appearance,andinteraction,makingwebsitesinteractive,responsive,andvisuallyappealing.Attributeslikesrc,href,class,type,anddisabledtransform

TocreatealistinHTML,useforunorderedlistsandfororderedlists:1)Forunorderedlists,wrapitemsinanduseforeachitem,renderingasabulletedlist.2)Fororderedlists,useandfornumberedlists,customizablewiththetypeattributefordifferentnumberingstyles.

HTML is used to build websites with clear structure. 1) Use tags such as, and define the website structure. 2) Examples show the structure of blogs and e-commerce websites. 3) Avoid common mistakes such as incorrect label nesting. 4) Optimize performance by reducing HTTP requests and using semantic tags.

ToinsertanimageintoanHTMLpage,usethetagwithsrcandaltattributes.1)UsealttextforaccessibilityandSEO.2)Implementsrcsetforresponsiveimages.3)Applylazyloadingwithloading="lazy"tooptimizeperformance.4)OptimizeimagesusingtoolslikeImageOptimtoreduc

The core purpose of HTML is to enable the browser to understand and display web content. 1. HTML defines the web page structure and content through tags, such as, to, etc. 2. HTML5 enhances multimedia support and introduces and tags. 3.HTML provides form elements to support user interaction. 4. Optimizing HTML code can improve web page performance, such as reducing HTTP requests and compressing HTML.

HTMLtagsareessentialforwebdevelopmentastheystructureandenhancewebpages.1)Theydefinelayout,semantics,andinteractivity.2)SemantictagsimproveaccessibilityandSEO.3)Properuseoftagscanoptimizeperformanceandensurecross-browsercompatibility.


Hot AI Tools

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

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

Undress AI Tool
Undress images for free

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

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.
