Getting Started with HTML—Quickly Mastering it in One Day
黄舟
Release: 2016-12-22 14:49:17
Original
1353 people have browsed it
Extraword
If you know nothing about html and are still worried about how to get started with html, the author highly recommends that you study this article, which will help you quickly master html. If you are already a master of html, then I also hope that you can Give me better advice.
Summary
HTML, commonly known as HyperText Markup Language, is the abbreviation of Hyper TextMarkup Language and is a markup language used to describe web page documents. The web page file itself is just a text file. By adding mark symbols to the text file, we can tell the browser how to display the content (such as how to process text, how to arrange pictures, how to display pictures, etc.). These mark symbols are what we html, we learn html by learning these mark symbols. Today we mainly learn some common html mark symbols, also called html elements,
tag elements
tag introduction
html elements include one or a pair of tag definitions of inclusion. The label is composed of two strings "". The label includes the start tag "" and the end tag ">".
html tag elements have four forms:
Empty element:
Empty element with attributes:
Element with content:
Element with content and attributes:This is the content
One thing to say here is that in the html document, Tag and attribute names are size independent.
A necessary basic element of the HTML framework
represents the beginning and end of the document
represents the beginning and end of the document head
), the exclamation mark (!), there is no space between the less than sign and the exclamation mark, followed by two dashes (--), then the comment content, and finally two dashes (--) and the greater than sign (>).
For example:
tags related to paragraph control
Create a paragraph, and the attribute align indicates the alignment of the paragraph Method, # can be left, center, right, justify.
The function is to break the line
The function is to insert a horizontal line, and the attribute color is used to represent the color.
Tag related to text display
…
Center the text
The function is to represent the document The title, n is an integer from 1 to 6, once is the maximum title, 6 is the minimum title, align is to set the title alignment, including left, center, right
. ..
Set the font, size is the font size, an integer from 1 to 7, the larger the number, the larger the font.
...
Make text bold.
…
Make text italic
Tabs created by list elements
a. Create a numbered list:
... ol>Use the start attribute to set the starting sequence number.
...
Use the value attribute to change the sequence of numbers in the list.
b. Create a list with items matching:
and
. The type attribute of their labels specifies the style of the symbol:
& lt; dl & gt; and & lt; dt & gt; label to create unsigned lists
& lt; dd & gt; dt & gt; Indented list
Label of table element
The role of table in web page layout is crucial. Table is defined with
,
is specifically defined as:
The border attribute is used to define the width of the table border, and the align attribute is used to set the alignment of the table, which can be left, right, or center. bgcolor is color.
…
Used to define the title of the table
...
Add a new row to the table
…
> ;Used to define headers
…
Used to define cells
html interactive form
The form is mainly responsible for data collection functions in web pages, such as our usual registration information, input All information that can be interacted with on a web page are forms.
Forms are created using
elements. By embedding other related elements or controls between the two, you can create a form as part of the html document.
The basic syntax for creating a form is as follows:
….
The attribute method is used to specify the method used when sending form data to the server The HTTP method can be either get or post. The submitted data is appended to the end of the URL and sent to the server as part of the URL.
The following are some commonly used elements about forms:
element is used to receive information entered by the user. It is an empty element with attributes. The syntax used to create controls in the form is
allows the user to select from a drop-down menu. Select one or more items in the list box. The list box is created by the
Multi-line text input control
…
The attribute rows is used to specify the number of text lines displayed in the visual area of the text box input control, cols specifies the visual area of the text input control Displayed width.
Hyperlink tag
The href attribute is used to specify the target of the link. The target address has URL positioning at the beginning. The text between the tags will be used as the link text displayed in the browser
.
Embedded image tag
The attribute src specifies the location of the image resource, and the attributes width and height are used to specify the size of the image. It should be noted here that src should be used as much as possible Relative paths instead of absolute paths.
Special character elements
Special characters include character references and entity references. Below we will summarize the commonly used ones
Summary
We will summarize some of the most commonly used and most basic tag elements. To summarize, once you master these basics, you can quickly become a junior HTML person. It is not a problem to write a simple HTML web page. This also lays the foundation for further learning in the future. The above is the introduction to HTML - quickly master it in one day. For more related content, please pay attention to the PHP Chinese website (m.sbmmt.com)!
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn