Common HTML tags
First, the use of a label
1. The attribute
Href: hyperlinks
eg.
<a href="//google.com">Copy the code
Target: The window in which to open the hyperlink
eg.
<a href="a/b/c.html" target="_blank">Copy the code
You can build in names
- The blank window opens
- _self opens its own window (default)
- _top The top layer is open
- _parent The parent window opens
Can be named by the programmer: window, iframe name
Download: Download web pages (rarely used)
rel=noopener
2. The role
Jump to external page/internal anchor point/mailbox/phone
The img tag
1. The attribute
- Alt fails to load, writing prompts the user
- Wide width
- Height is just width/height, the other one will be adaptive
- The SRC address
2. The role
Issue a GET request to display an image
3. The event
Onload succeeds, onerrer fails
4. The response type
5. Replaceable elements
3, table tag usage
1. The format
- Thead head
- Tbody subject
- Tfoot tail
- Tr table row
- Th table head Indicates the table head
- Td Table Data Indicates the data in the table
eg.
< table > < thead > < tr > < th > English < / th > < th > translate < / th > < / tr > < tr > < th > English < / th > < th > translate < / th > < / tr > < thead > < tbody > < tr > < td > target < / td > < td > target < / td > < / tr > < tr > < td > reference < / td > < td > reference < / td > < / tr > < / tbody > < / table >Copy the code
2. Related styles
eg.
<style>
table{
table-layout: auto;
border-collapse: collapse;
border-spacing: 0ch;
}
th,td{
border: 1px solid blue;
}
</style>
Copy the code
feeling
HTML is simple, come on!