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

JS realizes the calculation of the total price of goods in the shopping cart

JS calculates the total price of goods in the sho...

Nginx implements https website configuration code example

https base port 443. It is used for something cal...

Case analysis of several MySQL update operations

Table of contents Case Study Update account balan...

How to configure MySQL on Ubuntu 16.04 server and enable remote connection

background I am learning nodejs recently, and I r...

Summary of the differences between MySQL storage engines MyISAM and InnoDB

1. Changes in MySQL's default storage engine ...

Why Nginx is better than Apache

Nginx has taken over the majority of the Web serv...

Syntax alias problem based on delete in mysql

Table of contents MySQL delete syntax alias probl...

Solve the black screen problem after VMware installs Linux system and starts

1. Installation environment 1. HUAWEI mate x cpu ...

Summary of 7 types of logs in MySQL

There are the following log files in MySQL: 1: re...

Why does using limit in MySQL affect performance?

First, let me explain the version of MySQL: mysql...

Service management of source package installation under Linux

Table of contents 1. Startup management of source...

jQuery plugin to achieve carousel effect

A jQuery plugin every day - jQuery plugin to impl...

CSS3 to achieve menu hover effect

Result: html <nav id="nav-1"> <...

Summary of 76 Experience Points of User Experience

Classification of website experience 1. Sensory e...