Home Web Front-end HTML Tutorial The basic uses of html include links, style sheets, span and div, etc._HTML/Xhtml_Web page production

The basic uses of html include links, style sheets, span and div, etc._HTML/Xhtml_Web page production

May 16, 2016 pm 04:39 PM
Link

1. Links
Hypertext links in HTML are very important. The basic format is as follows:

Link text

1. Local link
①Absolute road strength:
Absolute road strength links to local pictures
②Relative road strength
Relative road strength links to local pictures
③ Link to the upper-level directory

Link to the upper-level directory

2. URL link
Format: protocol name: //host.domain name/roadjin /filename
Protocols include:
file local system file
http WWW server
ftp ftp server
telnet TELNET based protocol
mailto email
news Usenet news group
gopher GOPHER server
wais WAIS server

Such as: Baidu

3. Directory link
First set a certain paragraph as the link position, format For:

Then call the file in this link part and define the link:
Link text
Of course, if you jump within a file, the file name You can omit it and don’t write it.

2. Multi-view window FRAMES
HTML files designed using the FRAMES structure can divide the entire window into several independent small windows. Each small window can load different files and can communicate with each other.
1. Basic structure:







...


2. Size settings of each window
We divide the window into several pieces, using the ROWS attribute for horizontal division and vertical division Using the COLS attribute, the size of each block can be implemented by the values ​​of these two attributes.

The value of
# is a pair of strings enclosed in quotation marks. The numbers in the string represent the size of each window, separated by commas, where The number can also be replaced by "*", indicating that the size is automatically allocated by the browser. For example,


Evenly distribute the windows beyond 100 pixels
3. Interaction between windows
①The src attribute of the frame is used to specify the link content, the name attribute specifies the name of the window, and the target attribute is used to specify which window the linked file appears in. Its value can be the name defined by name, or it can be the following four types of values:
Display A new window
Displayed in the same window
Displayed in the window of the previous file in Frameset
Displayed in the entire browser window
②Other properties of frame
#=yes,no
frameborder specifies the setting of each window border: yes means there is a border, no means no border

The value of
# is the pixel point. The properties are used to set the width of the top, bottom, left and right borders of the window. If not set, the browser will automatically determine it.

#=yes,no,auto
Scroll bar setting, yes means yes, no means no, auto means automatically set by the browser, the default value is auto.


The noresize attribute specifies that the user cannot resize the frame. By default, frames can be resized by dragging the "walls" between them, and this property locks the size of the frames.

3. Style sheet
1. The most important role of style sheet is to provide a method to keep the style of all web pages consistent.
The three levels of style sheets, in order from low level to high level, are:
①. Built-in (inline) style sheet: applicable to the content of a single element
②. Document level (document level) style sheet : Applicable to the main body of the entire document
③. External (external) style sheet: Can be applied to the main body of multiple documents
When used, if a conflict occurs, the low-level style sheet has priority in use. .
2. Issues to note when using CSS:
① Some browsers may not support certain attribute values. In this case, the browser will either ignore these attribute values ​​or replace them with an optional value.
②The built-in style only adapts to a single element, which actually violates the original design intention of the style sheet, so it should be used with caution.
③Document level style description appears in the header of the document and applies to the entire body of the document. Therefore, this is how the overall style of website construction can be kept consistent.
④The external style sheet is not part of the document in which it is used. The external style sheet needs to be stored separately and must be explained when using it. External style sheets can be written into some text files using the MIME type text/css. They can be stored in any computer on the Internet. The browser obtains the external style sheet just like obtaining the document. The element at the head of a web page can also be used to specify an external style sheet. In , the rel attribute is used to specify the relationship between the linked document and the document containing the link, and the href attribute is used to specify the style sheet document. URL address. Such as


4. Use of span and div

In some cases, some special font attributes are required It only applies to part of the text of the entire paragraph, such as setting a certain word or phrase to a different font or background, etc. This is done by using the element, for example:

I like programming very much, it is a very pleasant thing.



Usage of

In web pages, sections are a very common form. Each section consists of several paragraphs. If in the design, it is hoped that not only each paragraph can be Styling sections in web pages. At this time, you can use
. Its main purpose is to specify the appearance display details of a certain section or area in the web page.
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)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
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)

How to use magnet links How to use magnet links Feb 18, 2024 am 10:02 AM

Magnet link is a link method for downloading resources, which is more convenient and efficient than traditional download methods. Magnet links allow you to download resources in a peer-to-peer manner without relying on an intermediary server. This article will introduce how to use magnet links and what to pay attention to. 1. What is a magnet link? A magnet link is a download method based on the P2P (Peer-to-Peer) protocol. Through magnet links, users can directly connect to the publisher of the resource to complete resource sharing and downloading. Compared with traditional downloading methods, magnetic

How to download links starting with 115://? Download method introduction How to download links starting with 115://? Download method introduction Mar 14, 2024 am 11:58 AM

Recently, many users have been asking the editor, how to download links starting with 115://? If you want to download links starting with 115://, you need to use the 115 browser. After you download the 115 browser, let's take a look at the download tutorial compiled by the editor below. Introduction to how to download links starting with 115:// 1. Log in to 115.com, download and install the 115 browser. 2. Enter: chrome://extensions/ in the 115 browser address bar, enter the extension center, search for Tampermonkey, and install the corresponding plug-in. 3. Enter in the address bar of 115 browser: Grease Monkey Script: https://greasyfork.org/en/

How to get the WeChat video account link? How to add product links to WeChat video account? How to get the WeChat video account link? How to add product links to WeChat video account? Mar 22, 2024 pm 09:36 PM

As part of the WeChat ecosystem, WeChat video accounts have gradually become an important promotion tool for content creators and merchants. Getting links to video accounts on this platform is crucial for sharing and disseminating content. The following will introduce in detail how to obtain the WeChat video account link and how to add product links to the video account to improve the dissemination effect of the content. 1. How to get the WeChat video account link? After posting a video on your WeChat video account, the system will automatically create a video link. Authors can copy the link after publishing to facilitate sharing and dissemination. After logging in to your WeChat video account, you can browse the homepage of your video account. On the home page, each video is accompanied by a corresponding link so you can copy or share it directly. 3. Search video account: Enter the video account name in the WeChat search box

How to connect Apple Notes on iPhone in the latest iOS 17 system How to connect Apple Notes on iPhone in the latest iOS 17 system Sep 22, 2023 pm 05:01 PM

Link AppleNotes on iPhone using the Add Link feature. Notes: You can only create links between Apple Notes on iPhone if you have iOS17 installed. Open the Notes app on your iPhone. Now, open the note where you want to add the link. You can also choose to create a new note. Click anywhere on the screen. This will show you a menu. Click the arrow on the right to see the "Add link" option. click it. Now you can type the name of the note or the web page URL. Then, click Done in the upper right corner and the added link will appear in the note. If you want to add a link to a word, just double-click the word to select it, select "Add Link" and press

What are the requirements for a video link? How to link the video account with goods? What are the requirements for a video link? How to link the video account with goods? Mar 07, 2024 pm 01:13 PM

With the popularity of short video platforms, more and more creators are beginning to use video accounts to create and promote content. Video accounts can not only showcase personal talents, but also realize commercial monetization through product links. However, to add a link to a video account, certain conditions must be met. 1. What are the requirements for a video link? Video account authentication is a prerequisite for adding links to your video account. Currently, major short video platforms such as Douyin and Kuaishou provide certification services, which mainly include two types: personal certification and institutional certification. Personal certification requires the submission of real identity information, while institutional certification requires the provision of certification materials from relevant companies or organizations. After completing the authentication, users can add links to their video accounts to enhance the credibility and authority of their accounts. One of the video link

How to stop Outlook from opening links in Edge browser How to stop Outlook from opening links in Edge browser Aug 03, 2023 am 11:49 AM

How to Stop Outlook from Opening Links in Edge Before proceeding, make sure your preferred browser is set as the default browser in Windows. This ensures that the Outlook link opens in the desired browser. To check and set your default browser: For Windows 10: Click the Start menu and select Settings Go to Apps and then Default Apps Look for "Web Browser" at the bottom of the list of default apps ” If your preferred browser is listed, you’re all set. If Microsoft Edge is listed, click on it and select your preferred browser from the list. If prompted, click Switch Anyway. Fix Edge issues

How to link on Doudian - Tutorial on linking on Doudian How to link on Doudian - Tutorial on linking on Doudian Mar 06, 2024 am 08:40 AM

Many friends still don’t know how to link on Doudian, so the editor below will explain the tutorial on how to link on Doudian. If you are in need, hurry up and take a look. I believe it will be helpful to everyone. Step 1: First open the Doudian computer terminal and enter "Window Product Management" on the left column, as shown in the picture. Step 2: Then click "Add Product" in the upper right corner, as shown in the picture. Step 3: Then copy and paste our product link, as shown in the picture. Step 4: Then click "Confirm Add", as shown in the picture. Step 5: Finally enter the introduction, pictures and other information, and then click "Confirm" to link on Douyin, as shown in the picture. The above is the entire content of how to add links to Doudian brought to you by the editor. I hope it can be helpful to everyone.

How to add excel link How to add excel link Mar 20, 2024 am 08:55 AM

Friends who have used Excel know that many times we need to add some links in Excel so that we can click on a link or keyword from Excel to enter other web pages or places. This is what the editor is going to talk about today about Excel links. Added question. First open the table and locate the keyword or image you want to add a link to. With the text box selected, right-click and select the "Hyperlink" option. Next a window to insert a hyperlink will pop up with several options. You can choose to link to content on the same worksheet, or to your desktop or other location. 2. If you want to link to Sheet2 as shown in the figure, select the location in the text file, then select Sheet2, and then click OK to confirm.

See all articles