search
HomeWeb Front-endHTML TutorialHTML Beginner's Guide (7)

HTML Beginner's Guide (7)

Dec 23, 2016 pm 02:46 PM
html

URLs
World Wide Web uses Uniform Resource Locators (URLs) to point to files on other servers. A URL includes the type of resource being accessed (e.g., Web, gopher, WAIS), the address of the server, and the location of the file. Syntax The format is:

scheme://host.domain [:port]/path/ filename

where scheme is one of the following

file
A file in the local system
ftp
A file in an anonymous FTP server
http
World File in Wide Web server
gopher
File in Gopher server
WAIS
File in WAIS server
news
A newsgroup newsgroup of Usenet
telnet
Connection to a Telnet-based service
Port The port number can usually be omitted. (Unless you are told to use it, ignore it)

For example, link to this guide in your document:


NCSA's Beginner's Guide to HTML


It marks the text NCSA's Beginner's Guide to HTML as a hyperlink, connected to the current document.

The link to the specified section
The anchor chain is also Can be used to guide the reader to a specific area in a document (either the current document or another document), not necessarily to the default top position. This type of anchor is often called a named anchor because When creating links, you need to insert HTML names into the document.

This guide is a good example of using named anchor chains in the same document. It makes a document easier to print. But when you just want to know about HTML Navigating through such a (long) document can be time consuming when only a portion of the information is included. Internal hyperlinks are used to create a "table of contents" at the beginning of the document. These hyperlinks allow you to browse from a point in the document The location is moved to another location. (Go to the top of this article and click on the link to a specific section in the content index. You will be returned here.)

You can also link to a specific section in another document. I mention this first because it will help You understand links within a document.

Links between specific sections in different documents
Suppose you want to create a link from document A (documentA.html) to a specific section in another document (MaineStats.html) link.

Enter HTML encoding to point to a named link:

documentA.html:

In addition to the many state parks, Maine is also home to
Acadia National Park. The string following the pound sign (#) can be seen as a tag in the file MaineStats.html. This tag tells the browser where to start displaying when the link is activated. Above In this example, the first line displayed will be the Acadia National Park heading.

Step 2, create a named anchor chain in MaineStats.html ("ANP" in this example)

Acadia National Park



After these elements are completed, you can let readers directly find the reference information of Acadia in MaineStats.html.

Note: If you want to link To go to a specific location in another document, you need to have write access to that document, or that document already contains a named anchor chain within the document. For example, you can include a link to this guide in the document you are writing. Anchors, because this article already contains named anchors (use View Source in your browser to see the code). But if this document did not have named anchors, you would not be able to make a link to a specific location because you would not be able to edit the NCSA server The original file in .

A link to a specified part of the current document
The syntax is the same as before, except that the file name is omitted.

For example, to link to ANP from MaineStats:

...More information about Acadia National Park
is available elsewhere in this document.

Be sure to include the tag (

< ;A NAME="ANP">Acadia National Park

).

When you think readers may need to print the entire document, or there are many short messages in one file that require online explanation Very useful.

Send Mail to Mailto
Contains the mailto attribute in the hyperlink, which makes it convenient for readers to send emails to a certain person or alias. The format is:

Name

For example, enter:

NCSA Publications Group

You can create a configured email to BUPT Publications Group mail window. (You should of course use another address!)

The above is the content of HTML Beginner’s Guide (7). For more related content, please pay attention to the PHP Chinese website (www.php.cn)!


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
How do you create a list in HTML?How do you create a list in HTML?May 06, 2025 am 12:01 AM

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

HTML in Action: Examples of Website StructureHTML in Action: Examples of Website StructureMay 05, 2025 am 12:03 AM

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.

How do you insert an image into an HTML page?How do you insert an image into an HTML page?May 04, 2025 am 12:02 AM

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

HTML's Purpose: Enabling Web Browsers to Display ContentHTML's Purpose: Enabling Web Browsers to Display ContentMay 03, 2025 am 12:03 AM

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.

Why are HTML tags important for web development?Why are HTML tags important for web development?May 02, 2025 am 12:03 AM

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

Explain the importance of using consistent coding style for HTML tags and attributes.Explain the importance of using consistent coding style for HTML tags and attributes.May 01, 2025 am 12:01 AM

A consistent HTML encoding style is important because it improves the readability, maintainability and efficiency of the code. 1) Use lowercase tags and attributes, 2) Keep consistent indentation, 3) Select and stick to single or double quotes, 4) Avoid mixing different styles in projects, 5) Use automation tools such as Prettier or ESLint to ensure consistency in styles.

How to implement multi-project carousel in Bootstrap 4?How to implement multi-project carousel in Bootstrap 4?Apr 30, 2025 pm 03:24 PM

Solution to implement multi-project carousel in Bootstrap4 Implementing multi-project carousel in Bootstrap4 is not an easy task. Although Bootstrap...

How does deepseek official website achieve the effect of penetrating mouse scroll event?How does deepseek official website achieve the effect of penetrating mouse scroll event?Apr 30, 2025 pm 03:21 PM

How to achieve the effect of mouse scrolling event penetration? When we browse the web, we often encounter some special interaction designs. For example, on deepseek official website, �...

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

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

SecLists

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.

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment