2.26 Xiaobai front-end learning diary

**

2.26 Learning Summary

**1. Absolute path and relative path
Path: the positional relationship between the current file (html file) and other files
Absolute path: Calculate the path where the file appears from the beginning.
For example: http://www.baidu.com or the C:\xampp\htdocs
relative path .represents the current directory.

  • The relative path ..represents the parent directory of the current directory.

  • a tag: link to the specified document.

  • hrefAttribute: The address of the page to jump to, the value can be an absolute path or a relative path.

  • note:

  1. Directory case problem: If you want to write the path, the server port is case-insensitive if it is under the window, if it is strictly case-sensitive in Linux. (If your directory is uppercase, you can use uppercase, and your directory is lowercase and you should use lowercase.)../Path/1.txt
  2. href属性Do not write the local absolute path for the value. The local absolute path uses the File protocol, and the file protocol is a local protocol that does not pass through the network.
  3. If the value is the absolute path of the website, add http://or https://(that is, add the agreement), otherwise it is looking for the contents of a certain folder of the HTML file.
  4. The link can be linked to the HTML file or to other places (for example: pictures).
  • targetProperties: where to open after clicking the link.

    • _blank, Opens in a new window.
    • _self, Opens in this window (default.).
    • 自定义名字

Anchor point: URL fragment identifier, request the sub-resource of the specified resource, and jump to the specified location when the specified link is clicked.
Mark block

<a href="#标记名">标记链接</a>

note:

  1. When marking the link in the second step, you need to add a #sign.
  2. The second step is to mark the link with the same name as the block.
  3. Sometimes when we write a page, we may not know where to link to, so at this time we can directly use a #number to indicate that this is an empty link.<a href="#">空链接</a>
  4. Unordered list (order: order)
  • An unordered list is ul标签represented by, which contains specific items in the list.

  • Each item is used <li>to represent.

  • Each item <li>can contain other tags.

  • Ordered list

    • ol means an ordered list.
    • Use li in each ol to represent each item.
  • Definition list: It consists of project description and project explanation.

    • <dl>Define a definition list
    • <dt>, Define the items in the list (themes)
    • <dd>To describe the items in the list.

    dl can only contain dt and dd, and dt and dd can contain other tags.
    Forms
    Forms, like excel, are used to display data.
    <table>Tags: tell the browser <table>and </table>content between the table belongs.

    • border属性:frame.
    • cellspacing属性: Control the distance between cells.
  • <caption>Label: Add a title to the table (optional).

  • <thead>Label: Add a header to the table (optional).

  • <tbody>Label: The main part of the form (required).

    Note: Many programmers writing code when not writing thead, tbody, tfootwrite can be, but even if you do not write tbodybecause he is the mandatory browser will automatically add time to explain.

  • <tfoot>Label: The footnote part of the table (optional).

note:

  1. Use <tr>tags for each row of data in thead, tbody, and tfoot .
  2. The cells in tr in thead use <th>labels.
  3. The cells in tr in tbody and tfoot use <td>labels.
html标签
<em>-----字体倾斜-----<i>
<strong>-------字体加粗-----<b>
<small>-----使标签内的内容更小
<big>-----使标签内的内容更大
<cite>----加书名号的内容,表示参考内容
<q>------表示短引用。可以默认给文字加引号
<blockquote>----表示长引用,是块元素,独占一行。
<sup>-----上标
<sub>-----下标
<ins>----插入内容,插入的内容底下会有个下划线----<u>
<del>----删除线-------<s>
<pre>----预格式标签,他会让我们的代码格式保存,不会忽略多个空格。格式保存
<code>----专门表示代码的,但他不会保留格式。一般和pre一起使用
<ul>---无序列表----<il>代表项
--type属性可以修改无序列表的项目符号,可选值:disc(默认值-圆点),square(方块),circle(空心圆圈)
<ol>---有序列表----<li>代表项
<dl>----自定义列表----<dt>代表标题----<dl>代表解释标题----<dl>处只能有dt和dl,dt和dl可以有其他标签

Insert picture description here
Some useful properties of the
table clospan ---- make the cell span
rowspan ---- cross row
border: 1px solid; border solid line
border-collapse: collapse; ---- border merge
margin: 0 auto;-block element from Adaptation level is centered
text-align: center;—Text is centered

Guess you like

Origin blog.csdn.net/ydqstudent/article/details/114141167