HTML Documents are made up of various tags . that , I learned how to use labels , It's easy to write HTML Document. .
The title is through <h1> - <h6> Such tags are defined .
<h1> This is a title 1</h1> <h2> This is a title 2</h2> <h3> This is a title 3</h3>……<h6> This is a title 6</h6>
among ,<h1> It's the biggest title ,<h6> It's the smallest title . The effect is as follows ：
<hr> Tags can be used to separate content , As shown below ：
<h1> This is a title 1</h1> <h2> This is a title 2</h2> <h3> This is a title 3</h3><hr><h6> This is a title 6</h6>
The passage is through <p> The label defines , The browser will automatically add blank lines before and after the paragraph . As shown below ：
<p> This is the passage A</p> <p> This is the passage B</p>
If you want to wrap in a paragraph , have access to <br> label , As shown below ：
<p> Now? <br> Show me <br> The effect of the branch </p>
HTML Documents use hyperlinks to connect to another document on the web , As shown below ：
<a href="https://blog.pangao.vip/"> Visit Pangao to accompany you to learn programming </a>
If you want to open a document in a new window , have access to target attribute , As shown below ：
<a href="https://blog.pangao.vip/" target="_blank"> Visit Pangao to accompany you to learn programming </a>
stay HTML In the document , Image by <img> Tag definition . The tag contains only attributes , There's no closed label . As shown below ：
<img src="//inotgo.com/imagesLocal/202105/03/20210503033624901b_5.jpg" alt=" Pan Gao's head ">
Source properties src The value of is the value of the image URL Address .alt Property is used to define a set of ready replaceable text for an image , When image acquisition fails , The text is displayed .
in addition to , have access to height And width Property to set the height and width of the image , As shown below ：
<img src="//inotgo.com/imagesLocal/202105/03/20210503033624901b_5.jpg" alt=" Pan Gao's head " width="300" height="400">
Form by <table> Label to define . Each table has several rows （ from <tr> Tag definition ）, Each row is divided into cells （ from <td> Tag definition ）. Data cells can contain text 、 picture 、 list 、 The paragraph 、 Forms 、 Level 、 Forms, etc . As shown below ：
<table border="1"> <tr> <th>Header 1</th> <th>Header 2</th> </tr> <tr> <td>row 1, cell 1</td> <td>row 1, cell 2</td> </tr> <tr> <td>row 2, cell 1</td> <td>row 2, cell 2</td> </tr> </table>
HTML Documents support ordered and unordered lists , As shown below :
majority HTML The element is defined as Block-level elements or Inline elements .
Block-level elements In browser display , It usually starts and ends with a new line . for example : <h1>, <p>, <ul>, <table> etc. .
Here's a new block level element tag <div>. She has no specific meaning , It's a combination of other HTML The container of elements .
Inline elements It usually doesn't start with a new line .
Here's a new inline element tag <span>. She doesn't have a specific meaning either , It's a container for text .