1. HTML link
1. HTML link syntax
The HTML code of the link is simple, for example:
<a href="URL">链接的名字</a>
2. HTML link-target attribute
Using the target attribute, you can define where to display the linked document.
For example:
<a href="http://www.taobao.com"target=_blank>淘宝淘宝</a>
let target=_blank to make the page open in a new tab
3. HTML link-id attribute
The id attribute can be used to create an HTML document bookmark tag.
**Tips: **Bookmarks are not displayed in any special way. They are not displayed in HTML documents, so they are hidden from readers.
2. HTML header
1. HTML <head> element
The <head> element contains all the head tag elements. In the <head> element you can insert scripts, sample files (CSS), and various meta information
. The element tags that can be added in the head area are: <title><style><meta><link><script ><noscript> and <base>
2.HTML <title> element
- The <title> tag defines the title of different documents
- <title> is required in HTML documents
- <title> element:
- Defines the title of the browser toolbar
- When the webpage is added to the favorites, the title displayed in the favorites
- The title displayed on the search engine results page
3.HTML <base> element
The tag describes the basic link address/link target. This tag serves as the default link for all link tags in the HTML document:For example, bring the logo of the offensive and defensive world:
effect:
Take a look at the logo address of the offensive and defensive world
(Here is an explanation of the meaning of the default link mentioned by the base attribute. For example, when setting the display picture, we will set the relative address, and the default address of the HTML document is set in the front, and the world.png is used directly when calling the photo. Relative address is fine)
4. HTML <link> element (I don't understand this too much, I will process it later)
- The <link> tag defines the relationship between the document and external resources.
(1).HTML <link> rel attribute
(2).HTML <link> href属性
5.HTML <style> element
- The <style> tag defines the style file reference address of the HTML document.
The type attribute indicates the content between the tags.
The value "text/css" indicates that the content is standard CSS. - You can also directly add styles to render HTML documents in the <style> element:
Examples:
effect:
6. HTML <meta> element (a bit problem, draw a *)
- The <meta> tag describes some basic metadata
- The <meta> tag provides metadata, which is not displayed on the page, but will be parsed by the browser.
- The META element is usually used to specify the description of the web page, keywords, the last modification time of the file, the author, and other metadata.
- Metadata can be applied to browsers (how to display content or reload the page), search engines (keywords), or other web services.
- <meta> is generally placed in the <head> area
7.HTML
- The <script> tag is used to load script files, such as JavaScript.
- The <script> element will be described in detail in later chapters