html网页制作代码大全(html常用标记)

当前位置: 电视猫 > HTML/Xhtml>
电视猫时间: 2024-07-13 09:29:59

  html网页制作代码大全(html常用标记)

HTML常用标记总结

HTML (HyperText Markup Language) is the standard markup language for creating web pages. It is used to structure and describe the content of a web page, including headings, paragraphs, images, links, and forms.

Here's a comprehensive summary of common HTML tags and their usage:

Structural Tags:

Tag Description Example
<!DOCTYPE html> Declares the document type as HTML5 <!DOCTYPE html>
<html> Defines the root element of an HTML document <html>
<head> Contains metadata about the document, such as title and character encoding <head><title>My Web Page</title></head>
<body> Contains the main content of the document, such as headings, paragraphs, images, and links <body><h1>Welcome to My Web Page</h1></body>

Text Formatting Tags:

Tag Description Example
<h1> to <h6> Define heading levels, with <h1> being the most important and <h6> being the least <h1>My Main Heading</h1><h2>Subheading</h2>
<p> Defines a paragraph of text <p>This is a paragraph of text.</p>
<br> Inserts a line break <p>This is a paragraph with a line break.<br>This is the next line.</p>
<hr> Inserts a horizontal line <hr>

Media Embedding Tags:

Tag Description Example
<img> Embeds an image into the web page <img src="image.jpg" alt="Image description">
<video> Embeds a video into the web page <video src="video.mp4" controls>Your browser does not support the video tag.</video>
<audio> Embeds an audio file into the web page <audio src="audio.mp3" controls>Your browser does not support the audio tag.</audio>

Hyperlink Tags:

Tag Description Example
<a> Creates a hyperlink to another web page or resource <a href="https://www.google.com">Link to Google</a>

Form Tags:

Tag Description Example
<form> Defines a form for collecting user input <form action="/submit" method="post">
<label> Associates a label with an input field <label for="name">Name:</label>
<input> Defines an input field <input type="text" id="name" name="name">
<textarea> Defines a multi-line text input field <textarea id="message" name="message" rows="5" cols="30"></textarea>
<button> Defines a button to submit the form or trigger an action <button type="submit">Submit</button>

Other Useful Tags:

Tag Description Example
<ul> Defines an unordered list <ul><li>Item 1</li><li>Item 2</li><li>Item 3</li></ul>
<ol> Defines an ordered list `<ol><li>1. Item 1</li><li>2. Item 2</li><li>3## HTML常用标记总结

HTML (HyperText Markup Language) is the standard markup language for creating web pages. It is used to structure and describe the content of a web page, including headings, paragraphs, images, links, and forms.

Here's a comprehensive summary of common HTML tags and their usage:

Structural Tags:

Tag Description Example
<!DOCTYPE html> Declares the document type as HTML5 <!DOCTYPE html>
<html> Defines the root element of an HTML document <html>
<head> Contains metadata about the document, such as title and character encoding <head><title>My Web Page</title></head>
<body> Contains the main content of the document, such as headings, paragraphs, images, and links <body><h1>Welcome to My Web Page</h1></body>

Text Formatting Tags:

Tag Description Example
<h1> to <h6> Define heading levels, with <h1> being the most important and <h6> being the least <h1>My Main Heading</h1><h2>Subheading</h2>
<p> Defines a paragraph of text <p>This is a paragraph of text.</p>
<br> Inserts a line break <p>This is a paragraph with a line break.<br>This is the next line.</p>
<hr> Inserts a horizontal line <hr>

Media Embedding Tags:

Tag Description Example
<img> Embeds an image into the web page <img src="image.jpg" alt="Image description">
<video> Embeds a video into the web page <video src="video.mp4" controls>Your browser does not support the video tag.</video>
<audio> Embeds an audio file into the web page <audio src="audio.mp3" controls>Your browser does not support the audio tag.</audio>

Hyperlink Tags:

Tag Description Example
<a> Creates a hyperlink to another web page or resource <a href="https://www.google.com">Link to Google</a>

Form Tags:

Tag Description Example
<form> Defines a form for collecting user input <form action="/submit" method="post">
<label> Associates a label with an input field <label for="name">Name:</label>
<input> Defines an input field <input type="text" id="name" name="name">
<textarea> Defines a multi-line text input field <textarea id="message" name="message" rows="5" cols="30"></textarea>
<button> Defines a button to submit the form or trigger an action <button type="submit">Submit</button>

Other Useful Tags:

Tag Description Example
<ul> Defines an unordered list <ul><li>Item 1</li><li>Item 2</li><li>Item 3</li></ul>
<ol> Defines an ordered list `<ol><li>1. Item ## HTML常用标记总结

HTML (HyperText Markup Language) is the standard markup language for creating web pages. It is used to structure and describe the content of a web page, including headings, paragraphs, images, links, and forms.

Here's a comprehensive summary of common HTML tags and their usage:

Structural Tags:

Tag Description Example
<!DOCTYPE html> Declares the document type as HTML5 <!DOCTYPE html>
<html> Defines the root element of an HTML document <html>
<head> Contains metadata about the document, such as title and character encoding <head><title>My Web Page</title></head>
<body> Contains the main content of the document, such as headings, paragraphs, images, and links <body><h1>Welcome to My Web Page</h1></body>

Text Formatting Tags:

Tag Description Example
<h1> to <h6> Define heading levels, with <h1> being the most important and <h6> being the least <h1>My Main Heading</h1><h2>Subheading</h2>

 

    最新电视剧
    热门电视剧
    影视资讯
    最新剧情排行榜
    最新电视剧剧情