Home Web Front-end HTML Tutorial Detailed introduction to HTML tags, selectors, hyperlinks and SEO

Detailed introduction to HTML tags, selectors, hyperlinks and SEO

Mar 23, 2017 am 09:33 AM

Common tags:

block

The img tag is a single tag alt function. The image fails to load and displays the content in the alt

< img src="Picture name" alt="Picture name"/>

Detailed introduction of a tag:

Link implementation of a tag:

a tag Clicking the a tag

will go to the corresponding link to control the link to open a new page or other target, as well as self and other

him;

Write in the head section; the default page opening method for all links

, if there are some people in the body section For the target attribute, the target attribute in the a tag in the body part is

first;

The download implementation of the a tag: Put in the things to be downloaded Use

# inside to implement the download function

The anchor point implementation of the a tag: (a Anchor) Baibu Fei

The title tag is not one but a group of six:

Paragraph tag Use p tag for a paragraph

< ;p/>

Emphasis tag strong The page is displayed in bold by default

Content (Content)

Also The effect of emphasis is not as important as the tone of the strong tag. The default display is italic

span tag

distinguishes styles, a paragraph of text or content style distinguishes

Conten

List

Ordered List

  1. (List Item)< ;/li>

No list required

  • (list item)

Definition list

Definition list title

Define list items

SEO: Search engine optimization For example: Baidu wait

Function: There is a crawler program that searches for information every day and saves it.

Advantages of tags:

Semantic page tags;

Using tags that are beneficial to SEO; h1; h2; h3;strong;em accounts for about 7% or 8%. Reasonable optimization

Do not overuse

Increase page keyword density;

id selector

#box1,box2{

width:100px;height:100px;background:red;

}

Group selector # followed by id+","+ A group of id uses the same style

.box(id) and the use of class class is a class, which can be understood as an id that can be used repeatedly

;

class selector can be followed by multiple styles

Type selector tag name {}

Inclusion selector: Select according to the inclusion relationship in the page

div p{ } represents all p tags in the div tag

Wildcard character

*{border:1px solid red;} All in the page have this format and are basically useless

Selector Priority:

Prerequisites at the same level: The style defaults to the latter overriding the former

The higher the inclusion level, the style will use which

class style selector

The order of calling names at the same level does not matter, only the order of styles

Type (1)

(javaScrapt)

Compare style priorities and judge based on the number of highest style priorities

Do not write too deep inclusion relationships during work

Pseudo-class of a:

link not visited

hover mouse hover (mouse across)

active link activation

visited after visit

Written in style

a:link{}

a:hover{}

Pseudo class sequence link visited hover active

Application: Search engine novels, etc.

div pseudo-class: hover Most tags support hover

IE6 does not support a pseudo-class of any other tags

Supported by IE6 and above

The above is the detailed content of Detailed introduction to HTML tags, selectors, hyperlinks and SEO. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
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

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

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What is the purpose of the <progress> element? What is the purpose of the <progress> element? Mar 21, 2025 pm 12:34 PM

The article discusses the HTML &lt;progress&gt; element, its purpose, styling, and differences from the &lt;meter&gt; element. The main focus is on using &lt;progress&gt; for task completion and &lt;meter&gt; for stati

What is the purpose of the <datalist> element? What is the purpose of the <datalist> element? Mar 21, 2025 pm 12:33 PM

The article discusses the HTML &lt;datalist&gt; element, which enhances forms by providing autocomplete suggestions, improving user experience and reducing errors.Character count: 159

What are the best practices for cross-browser compatibility in HTML5? What are the best practices for cross-browser compatibility in HTML5? Mar 17, 2025 pm 12:20 PM

Article discusses best practices for ensuring HTML5 cross-browser compatibility, focusing on feature detection, progressive enhancement, and testing methods.

What is the purpose of the <meter> element? What is the purpose of the <meter> element? Mar 21, 2025 pm 12:35 PM

The article discusses the HTML &lt;meter&gt; element, used for displaying scalar or fractional values within a range, and its common applications in web development. It differentiates &lt;meter&gt; from &lt;progress&gt; and ex

How do I use HTML5 form validation attributes to validate user input? How do I use HTML5 form validation attributes to validate user input? Mar 17, 2025 pm 12:27 PM

The article discusses using HTML5 form validation attributes like required, pattern, min, max, and length limits to validate user input directly in the browser.

What is the viewport meta tag? Why is it important for responsive design? What is the viewport meta tag? Why is it important for responsive design? Mar 20, 2025 pm 05:56 PM

The article discusses the viewport meta tag, essential for responsive web design on mobile devices. It explains how proper use ensures optimal content scaling and user interaction, while misuse can lead to design and accessibility issues.

What is the purpose of the <iframe> tag? What are the security considerations when using it? What is the purpose of the <iframe> tag? What are the security considerations when using it? Mar 20, 2025 pm 06:05 PM

The article discusses the &lt;iframe&gt; tag's purpose in embedding external content into webpages, its common uses, security risks, and alternatives like object tags and APIs.

Gitee Pages static website deployment failed: How to troubleshoot and resolve single file 404 errors? Gitee Pages static website deployment failed: How to troubleshoot and resolve single file 404 errors? Apr 04, 2025 pm 11:54 PM

GiteePages static website deployment failed: 404 error troubleshooting and resolution when using Gitee...

See all articles