html>The above is"/>
html>The above is">
Home > Article > Web Front-end > Let’s talk about some common ways to write HTML
HTML is a markup language used to create web pages and other web applications. Here are some common ways to write HTML.
Page content
< ;/body>
The above is a basic HTML structure, in which declares the use of HTML5, represents the opening tag of HTML, html> represents the closing tag of HTML. Between the and tags, we can also add the
tag and the tag to define the page header and page body respectively.In HTML, tags are keywords used to define elements, such as
represents a paragraph,
and
are a pair of tags, called elements.There are many tags in HTML used to format text, for example:
Paragraph tag p>
Bold label
Italic label
Upper corner label
Lower corner label
Strikethrough tags
Underline tags
are used to create links The tag for is , for example:
The tag for inserting an image is , for example:
Among them, the href attribute is used to specify the link address, the src attribute is used to specify the image path, and the alt attribute is used to set the Alternative text when the image cannot be displayed.
Use table tags in HTML to create tables, for example:
Header 1 | Header 2 |
---|---|
Cell 1 | Cell 2 |
Among them, < ;table> represents a table,
The tag used to create a form is
Among them, the action attribute specifies the address for form submission, and the method attribute specifies the submission method. The name attribute is used to identify each form element, and the label is used to label the associated input box.
The above are some common ways to write HTML. I hope it will be helpful to everyone.
The above is the detailed content of Let’s talk about some common ways to write HTML. For more information, please follow other related articles on the PHP Chinese website!