HTML+CSS Basic HTML tags for easy entry (1)

Comments in

html

There are many kinds of HTML tags. You can refer to the manual. Next, we will explain some of our commonly used tags.

First we will talk about the P tag paragraph (p)

    

大家好

Then we will browse Run on the server, the output is: Hello everyone

Look at the following code:

    

大家好

大家好!

The paragraph will wrap itself, so the output is:

Hello everyone

Hello everyone

----- is an auxiliary tag within the head tag, usually used to set encoding and optimize keywords for promotion


-------Line break

---------Format text

------Table

------Inline label

Tips and Notes:

Tip: Use to group inline elements so that they can be formatted with styles.

Note: span has no fixed format. It only changes visually when you apply a style to it.

to
-----Control font size

----- --Split the document into independent and different parts (we will explain it when we learn css)


-------Title and title separated by horizontal lines Paragraph

Next, let’s first explain these simple tags

The following code:

     

大家好123456

大家好

111111111111111
1111111111111111
我们都一样

中国

中国

中国

中国

中国
中国

Everyone copy the code to your computer, create a file with the suffix .html and then Double-click to preview

Table

Please look at the following code:

     

美国 日本 中国
123 456 789
123 456 789

The table is composed of rows and columns. To be precise, it cannot be called columns, but can only be called cells.

The tag in the above code represents the row and represents the cell. But we are previewing It is displayed in the form of a table, so it is called 3 rows and 3 columns.

Defines the header cell, which is generally used for titles. For example, we make a weekly schedule from Monday to Sunday. These words need to be bolded etc.

The above code execution results:

United States Japan China

123 456 789

123 456 789

We are not used to seeing such a table, so let me add a border to the table

in the above code. We add border='1' to the table tag and then we add a width and height to the table width="300" height="200"

The specific code is as follows:

     
美国 日本 中国
123 456 789
123 456 789


Continuing Learning
||
美国 日本 中国
123 456 789
123 456 789
submit Reset Code
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!