HTML Basic Notes (Recommended)

HTML Basic Notes (Recommended)

1. Basic structure of web page:

XML/HTML CodeCopy content to clipboard
  1. < html >   
  2.      < head >   
  3.                  < title > My first web page </ title >   
  4.      </ head >   
  5.      < body >   
  6. This is my first webpage
  7.      </ body >   
  8. </ html >   

Note: In HTML, tags mostly appear in pairs. Where there is a beginning, there is an end

If the tag does not appear in pairs, add / after the tag to indicate the end.

2. Basic Tags

1. h1-h6 title tags
2. em italic
3. Strong bold
4. hr cutting line
5. br line break
6. p paragraph tag
7. Special symbols, spaces
8.&gt; Special symbols,>
9. &lt; Special symbols, <
10. "Special symbols,"
11. &copy; Special symbol, copyright symbol
12. Notes
13. img image tag

Attributes: src: the path of the image, alt: the text displayed when the image cannot be found
Title: The text displayed when the mouse hovers:
<img src="..." alt="..." title="..."/>

14. a Hyperlink tag attribute: href: where to link to Usage:
<a src="...">Link</a>
First write <a name="?"></a> in one place for the anchor link
Then write <a href="?"></a> in another location
Click on this link and you'll find this? Location

usage:
<a name="?">Link here</a>
<a href="?">Link from here</a>

15. Usage of ul-li unordered list:
<ul>
<li>List Item 1</li>
.......
<li>List item n</li>
</ul>

Note: There is no order, each li is a row. By default, there is a solid dot in front of each li.

16. ol-li ordered list usage:
<ol>
<li>List Item 1</li>
.......
<li>List item n</li>
</ol>
That is, replace the solid dots in the unordered list with serial numbers.

17. dl-dt-dd definition list usage:
<dl>
<dt>Title 1</dt>
<dd>Content 1</dd>
<dt>Title 2</dt>
<dd>Content 2</dd>
</dl>

Result:
Title 1
Content 1
Title 2
Content 2

18. Form Elements
a. text single-line text box
b. Password box
c. Radio button
d. file file selector
e. checkbox
f. Select drop-down list
g. submit button
h. reset button
i. textarea text area

usage:
<textarea cols="50" rows="20">
12345678941515641
</textarea>

j. Form tag submission tag syntax:
<form method="Submission method" action="Where to submit">

</form>
If action is empty, it means submitting to the current page
method optional attributes: post, get
Post is highly secure, and the submitted information will not be displayed in the address bar
Get is less secure. The submitted information is displayed in the address bar. If you do not write the method attribute, the default is get.

k. Optional value of input tag: form element ai

l. Select drop-down list

usage:
<select>
<option>2016</option>
<option>2015</option>
<option>2014</option>
</select>

m. <label> Name: <input type = "text"/></label> Associated form

Function: Click the word "name" and the mouse will focus on the text box behind the name.

3. Note:
1. Tag names should be lowercase
2. HTML tags should be closed (ended)
3. Tags should be nested correctly

4. Form properties
1. readonly="readonly" read-only
2. disabled="disabled" disable

5. Table
1. What is a table?
The simplest one is the queue, between tables, you can write things

2. How to use the form?
First draw a big box, then draw each row, then draw each column
<table>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
</table>

3. Data or elements can be placed in td

4. Some properties of table:
width: Set the width
border: the thickness of the border
align: alignment, the most common, center, horizontal alignment
valign: alignment, the most common, center, top and bottom alignment
cellspacing="20": the distance between cells, the default value is 0
cellpadding="20": the distance between the content and the grid, the default value is also 0
bgcolor: Change the background color

5. Merger:
colspan="2": merge cells horizontally
rowspan="2": merge cells vertically

The above basic HTML notes (recommended) are all the content that the editor shares with you. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM.

Original URL: http://www.cnblogs.com/w13248223001/archive/2016/07/21/5693437.html

<<:  MySQL should never write update statements like this

>>:  Detailed explanation of common methods of Vue development

Recommend

JavaScript to achieve digital clock effects

This article example shares the specific code for...

Detailed explanation of nginx upstream configuration and function

Configuration Example upstream backend { server b...

Complete steps to set up automatic updates in CentOS 8

The best thing you can do for your data and compu...

You may need a large-screen digital scrolling effect like this

The large-screen digital scrolling effect comes f...

js to write the carousel effect

This article shares the specific code of js to ac...

The connection between JavaScript constructors and prototypes

Table of contents 1. Constructors and prototypes ...

Deploy Nginx+Flask+Mongo application using Docker

Nginx is used as the server, Mongo is used as the...

Detailed explanation of the basic use of Apache POI

Table of contents Basic Introduction Getting Star...

Summary of 10 amazing tricks of Element-UI

Table of contents el-scrollbar scroll bar el-uplo...

How to modify port 3389 of Windows server 2008 R2 remote desktop

The default port number of the Windows server rem...

Detailed explanation of Navicat's slow remote connection to MySQL

The final solution is in the last picture If you ...

The Complete Guide to Grid Layout in CSS

Grid is a two-dimensional grid layout system. Wit...

When MySQL is upgraded to 5.7, WordPress reports error 1067 when importing data

I recently upgraded MySQL to 5.7, and WordPress r...

JS practical object-oriented snake game example

Table of contents think 1. Greedy Snake Effect Pi...

MySQL 8.0.21.0 Community Edition Installation Tutorial (Detailed Illustrations)

1. Download MySQL Log in to the MySQL official we...