Home > Article > Web Front-end > Introduction to HTML
Introduction to HTML
1. The function of a web browser is to read HTML documents and display them in the form of web pages. Browsers do not display HTML tags, but use tags to interpret the content of the page.
2.
My first paragraph.
#
#and
The text between #and
and
is displayed as a paragraph.
tag.
is an empty element without a closing tag (
tag definition newline).
, is the correct way to close an empty element and is accepted by HTML, XHTML and XML.
works in all browsers, using
is actually a longer-term guarantee.
has additional information about alignment.
Has additional information about background color.
tag creates a horizontal line in an HTML page. The
It's a bad habit to insert a blank line. Replace it with the
tag! tag:
This is
a para
graph with line breaks
element is an empty HTML element. Since a closing tag doesn't make any sense, it doesn't have a closing tag.
This is preformatted text. >>>>>>>>>>> Preformatted text. It preserves spaces It preserves spaces and line breaks. and line breaks. pre tag is great for displaying computer code AddressThis example shows how to write an address in an HTML file. Donald Duck’s address:
Donald Duck
BOX 555
Disneyland
USA
W3School’s address:
Shanghai Yingke Investment Co., Ltd.Result: Donald Duck’s address: Donald Duck BOX 555 WWW
No. 789, Jinqiao Development ZoneText Direction
Here is some Hebrew textHere is some Hebrew text
Block Quote
This is a long quote. This is a long quote. This is a long quote. This is a long quote. This is a long quote. This is a long quote. This is a long quote. This is a long quote. This is a long quote. This is a long quote. This is a long quote.
If you use the blockquote element, the browser will insert line breaks and margins, and the q element will not have any special rendering.
HTML Style Example - Background Color The
background-color attribute defines the background color for the element:
This is a heading
This is a paragraph.
font The -family, color and font-size attributes respectively define the font family, color and font size of the text in the element:
A heading
A paragraph.
The text-align attribute specifies the horizontal alignment of the text in the element Method: sThis is a heading
方式 方式 方式 方式
The header of the table of the table is defined as the header of the table. ...
row 1, cell 2
row 2, cell 1
row 2, cell 2
table border="1"> row 1, cell 1
row 1, cell 2
row 2, cell 1
Unordered list:
An unordered list:
- Coffee
- Tea
- Milk
Ordered list:
one Ordered list:
- coffee
- tea
- milk
definition list
- Coffee
- Black hot drink
- Milk
- White cold drink
Form
A form is an area that contains form elements.
Form elements are elements that allow users to enter information in a form (such as text fields, drop-down lists, radio buttons, check boxes, etc.).
Forms are defined using form tags (
Radio button
Saab
Text fieldThis example shows how to create text Field (multiline text input control). The user can write text in the text field. There is no limit to the number of characters that can be written.This example cannot be edited
Create Box:
Health Information:Height:
Weight:
First name:
I have a car:
Form with radio buttons
Phone
555 77 855
Illustration: Name Bill Gates
Phone 555 77 854
Phone 555 77 855
Table with title
This example demonstrates a table with a title (caption)
My title spans two columns of cells:
Name
Phone Cells spanning two rows:
Phone
555 77 854