search
HomeWeb Front-endHTML TutorialHTML CSS_html/css_WEB-ITnose

Everyone who does website development knows that Html is the basis of web development, and CSS is the layout technique we often use to design web page aesthetics. This article will record the basic knowledge about the two and lay the foundation for you. Only when we are secure can we go further. Neither jsp nor php can exist without html.

1. HTML tags:

1. Bold tags

2. Italic tags

3. Individual style

4. Quotation marks

5.

Long Text quote

6.

Address information

7. Single line of code

8.

: The function is to use search engines to understand the table

11.

Table title text
> ;

12. Target="_blank" of a tag: Open in a new page

13. Title of a tag="Mouse slide over to display text"

14 , Picture description text

 15. Text label:

16. stry: style tag

17. Email tag:

18. , the drop-down list can also perform multiple selection operations. Set the multiple="multiple" attribute in the

 

 19. The label tag does not present any special effects to the user. Its function is to improve usability for mouse users. This control will be triggered if you click on the text inside the label. That is to say, when the user clicks to select the label, the browser will automatically turn the focus to the form control related to the label (it will automatically select the form control related to the label).

This is a summary of the common tags in HTML. These tags are commonly used but not easy to remember. This article is for your convenience. Let’s review the basic knowledge of CSS together.

2. CSS:

<form>  <label for="male">男</label>  <input type="radio" name="sex" id="male" />  <br />  <label for="female">女</label>  <input type="radio" name="sex" id="female" />  <label for="email">输入你的邮箱地址</label>  <input type="email" id="email" placeholder="Enter email"></form>
1. CSS styles: inline, embedded, external

2. CSS selectors are divided into: A. Label selection Selector: body{}B, class selector: .setGreen{}C, ID selector: #setGreen{}D, universal selector: *{}

3. Text layout:

Font-family: "宋体";

Font-weight:bold; bold

;Underline

    text-indent: 2em; Indent 2 bytes

     Line-height: 1.5em; Line spacing is 1.5 bytes

    Letter-spacing: 1.5em; word spacing, letter spacing

4. Priority of the three methods: inline > embedded > external, but embedded > external has a prerequisite: embedded css style The position must be behind the external type. For example, in the right code editor, the code is in front of the code (actually This is also written during development). Interested friends can try it, reverse their order, and see if their priorities change. In fact, in summary, it is the proximity principle (the closer to the element being set, the higher the priority).

5. Pseudo-class selector: What is more interesting is the pseudo-class selector. Why is it called a pseudo-class selector? It allows setting styles for tags that do not exist in html (a certain state of the tag). For example, we Set the font color (a:hover{color:red;}) for the mouse-over state of a label element in HTML.

6. Grouping selector: When you want to set the same style for multiple label elements in HTML, you can use the grouping selector (,). The following code is h1, span in the code editor on the right The label also sets the font color to red: h1,span{color:red;} which is equivalent to the following two lines of code: h1{color:red;}span{color:red;}

7. Weight Rules: The weight of the label is 1, the weight of the class selector is 10, and the weight of the ID selector is up to 100. For example, the following code:

 p{color:red;} /*The weight is 1*/
 p span{color:green;} /*The weight is 1 1=2*/
 .warning{color:white; } /*The weight value is 10*/
 p span.warning{color:purple;} /*The weight value is 1 1 10=12*/
  #footer .note p{color:yellow;} /* The weight is 100 10 1 = 111*/
Note: There is another special weight - inheritance also has a weight but it is very low. Some documents suggest that it is only 0.1, so it can be understood that inheritance has the lowest weight.

8. Element classification: Before explaining CSS layout, we need to know some knowledge in advance. In CSS, label elements in html are generally divided into three different types: block elements and inline elements. (also called inline elements) and inline block elements.

Commonly used block elements are:

 ,

, ,
,
,

Commonly used inline elements are:

  , < ;span>,
, , , ,

Commonly used inline block elements are:

 HTML CSS_html/css_WEB-ITnose,

9. In HTML

,

, < ;h1>,

,
Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
HTML as a Markup Language: Its Function and PurposeHTML as a Markup Language: Its Function and PurposeApr 22, 2025 am 12:02 AM

The function of HTML is to define the structure and content of a web page, and its purpose is to provide a standardized way to display information. 1) HTML organizes various parts of the web page through tags and attributes, such as titles and paragraphs. 2) It supports the separation of content and performance and improves maintenance efficiency. 3) HTML is extensible, allowing custom tags to enhance SEO.

The Future of HTML, CSS, and JavaScript: Web Development TrendsThe Future of HTML, CSS, and JavaScript: Web Development TrendsApr 19, 2025 am 12:02 AM

The future trends of HTML are semantics and web components, the future trends of CSS are CSS-in-JS and CSSHoudini, and the future trends of JavaScript are WebAssembly and Serverless. 1. HTML semantics improve accessibility and SEO effects, and Web components improve development efficiency, but attention should be paid to browser compatibility. 2. CSS-in-JS enhances style management flexibility but may increase file size. CSSHoudini allows direct operation of CSS rendering. 3.WebAssembly optimizes browser application performance but has a steep learning curve, and Serverless simplifies development but requires optimization of cold start problems.

HTML: The Structure, CSS: The Style, JavaScript: The BehaviorHTML: The Structure, CSS: The Style, JavaScript: The BehaviorApr 18, 2025 am 12:09 AM

The roles of HTML, CSS and JavaScript in web development are: 1. HTML defines the web page structure, 2. CSS controls the web page style, and 3. JavaScript adds dynamic behavior. Together, they build the framework, aesthetics and interactivity of modern websites.

The Future of HTML: Evolution and Trends in Web DesignThe Future of HTML: Evolution and Trends in Web DesignApr 17, 2025 am 12:12 AM

The future of HTML is full of infinite possibilities. 1) New features and standards will include more semantic tags and the popularity of WebComponents. 2) The web design trend will continue to develop towards responsive and accessible design. 3) Performance optimization will improve the user experience through responsive image loading and lazy loading technologies.

HTML vs. CSS vs. JavaScript: A Comparative OverviewHTML vs. CSS vs. JavaScript: A Comparative OverviewApr 16, 2025 am 12:04 AM

The roles of HTML, CSS and JavaScript in web development are: HTML is responsible for content structure, CSS is responsible for style, and JavaScript is responsible for dynamic behavior. 1. HTML defines the web page structure and content through tags to ensure semantics. 2. CSS controls the web page style through selectors and attributes to make it beautiful and easy to read. 3. JavaScript controls web page behavior through scripts to achieve dynamic and interactive functions.

HTML: Is It a Programming Language or Something Else?HTML: Is It a Programming Language or Something Else?Apr 15, 2025 am 12:13 AM

HTMLisnotaprogramminglanguage;itisamarkuplanguage.1)HTMLstructuresandformatswebcontentusingtags.2)ItworkswithCSSforstylingandJavaScriptforinteractivity,enhancingwebdevelopment.

HTML: Building the Structure of Web PagesHTML: Building the Structure of Web PagesApr 14, 2025 am 12:14 AM

HTML is the cornerstone of building web page structure. 1. HTML defines the content structure and semantics, and uses, etc. tags. 2. Provide semantic markers, such as, etc., to improve SEO effect. 3. To realize user interaction through tags, pay attention to form verification. 4. Use advanced elements such as, combined with JavaScript to achieve dynamic effects. 5. Common errors include unclosed labels and unquoted attribute values, and verification tools are required. 6. Optimization strategies include reducing HTTP requests, compressing HTML, using semantic tags, etc.

From Text to Websites: The Power of HTMLFrom Text to Websites: The Power of HTMLApr 13, 2025 am 12:07 AM

HTML is a language used to build web pages, defining web page structure and content through tags and attributes. 1) HTML organizes document structure through tags, such as,. 2) The browser parses HTML to build the DOM and renders the web page. 3) New features of HTML5, such as, enhance multimedia functions. 4) Common errors include unclosed labels and unquoted attribute values. 5) Optimization suggestions include using semantic tags and reducing file size.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

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

Hot Tools

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment