Just like an article, our web pages must also have clear paragraphs and titles of different degrees of importance. This section will introduce common signatures in XHTML that implement titles, paragraphs and other functions.
To define the title, we can use the tags from <h1> to <h6>. The corresponding termination tags are </h1> to </h6> respectively, where the font size order of <h1> to <h6> is reduced and the importance is gradually reduced. The browser will automatically free up a line above and below the title.
Defining a paragraph uses <p> and </p>, and the content between <p> and </p> will be recognized as a paragraph, which is similar to what we usually call a paragraph. Similar to the title, the browser will also add a line of blank space before and after the paragraph begins.
When we think about writing another line but don’t want another paragraph, we can apply the tag. <br>The tag is also an empty tag, and one/ needs to be added to meet the requirements of XHTML.
The label that implements the horizontal dividing line is <hr />. Like the <br> tag, <hr> is also an empty tag. In order to comply with the rules of XHTML, a / needs to be added. (The following is a dividing line)
Reasonable use of the four tags introduced above can make users browsing your web page feel that the web page is clear, while comments can make you feel that the web page is clear when reading your web page source code so that you won’t be confused. The thing between <!-- and --> is the content of the comments, and they will not be displayed on the web page. See how we insert comments in the exercise example below.
Now open the web page we saved in the previous section and practice the important tags we learned in this section. Let the <body></body> be my first <b>web page</b>. Remove and enter the following:
| <h1>Service Announcement</h1><!--Practice the use of the title and see if the font size has become larger? --> <hr /><!--Horizontal dividing line, don't forget that/ --> <h2>I am now providing the following services to primary school students and parents across the country: </h2><!--Title No. 2, see if the font size is smaller than Title No. 1--> <h3>Services for students</h3> <p> Writing winter and summer homework (Mathematics does not guarantee that there are no wrong questions, Chinese does not guarantee that there are no wrong words, English homework, please find someone else) <br />To help bully students under the fourth grade, a special sports fee must be charged. <br />Parents will help pretend to be parents. </p><!--The above content is a paragraph--> <h3>VIP Service</h3> <p>Anyone who purchases all three services will be automatically upgraded to VIP. We will create a personal homepage for you for free, which is fully compliant with W3C's XHTML standard and ISO2009~. </p> <!--Although the web pages here are quite distinct, do you think the interface is really ugly and simple? For example, there is no gap between lines, title number one Too big. The method of defining the appearance of a web page will be described later in the CSS tutorial. I forgot to talk about the main content, the comments will not appear on the web page, so We can make a lot of nonsense here. However, try to write some prompt comments in the future process of web page design. --> |