HTML Self-study Journey (I) Basic Elements and Attributes Practice (Write Your Own Code)

HTML Self-study Journey (I) Basic Elements and Attributes Practice (Write Your Own Code)
I followed the tutorial on W3school. I think the tutorial is very good. There are small exercises in each section. Come on!
All the codes are written by myself. Some books are against writing code by yourself, but I think it is beneficial to write it by yourself because I have no basic knowledge. Hehe, personal opinions vary. .
Exercise 1 :

Copy code
The code is as follows:

<html>
<body bgcolor="yellow">
<h1 align="center">This is heading 1</h1>
<h2 align = "left">This is heading 1</h2>
<h3 align = "right">This is heading 1</h3>
<h4>This is heading 1</h4>
<h5>This is heading 1</h5>
<h6>This is heading 1</h6>
<!--<h7>This is heading 1</h7>-->
<!--Another comment, try the effect-->
<p>This is the first paragraph
</p>
<hr />This is the link area

<a href="http://www.baidu.com">This is baidu link</a>
<br/>
<a href="http://www.w3school.com.cn">This is w3school link</a>
<hr />This is the picture area

<img src = "upload/2022/web/96x96_1758293e995c.jpg" />
<hr />This is the table area
<table border="1">
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
</table>
<hr />Line break function
<p>This sentence wraps here
</p>
<p>
This paragraph has a lot of blank lines or spaces but the browser automatically ignores them
</p>
<pre>
This is preformatted text that can display blank lines, spaces, and code
</pre>
<pre>
while(true)
{
sum=a+b;
return sum;
cout<<sum;
}
</pre>
</body>
</html>

Exercise 2 :

Copy code
The code is as follows:

<html>
<body>
<b>This text is bold</b>

<strong>This text is strong</strong>

<big>This text is big</big>

<small>This text is small</small>

<em>This text is emphasized</em>

<i>This text is italic</i>

This text contains <sub>subscript</sub>

This text contains<sup>superscript</sup>
<hr />
<pre>
This is pre-formatted text. Haha, you can output spaces and blank lines, right?
</pre>
<code>
while(true)
{
computer code;
}
</code>
<kbd>keyboard input</kbd>

<samp>Sample text</samp>

<var>Computer variable</var>
<hr />
Address Exercise:
<address>
Tianjin SHUDIP

FERT R

ABC (collection)

Zip code: 123456
</address>
Abbreviation Practice

<abbr title = "etcetera">etc.</abbr>

<acronym title = "World Wide Web">www.</acronym>
<hr />Text direction exercise // This function is not supported. The text should be output from right to left.

<bdo dir="rt1">Here is some text</bdo>
<hr />Block reference exercise

This is a long quote
<blockquote>This is a long quote. This is a long quote. This is a long quote. This is a long quote. This is a long quote. This is a long quote. This is a long quote. This is a long quote. This is a long quote. This is a long quote. This is a long quote. This is a long quote. This is a long quote. This is a long quote. This is a long quote. This is a long quote. This is a long quote. This is a long quote. This is a long quote. This is a long quote. This is a long quote. This is a long quote. This is a long quote. This is a long quote. This is a long quote. This is a long quote. This is a long quote. This is a long quote. This is a long quote. This is a long quote. This is a long quote. This is a long quote. This is a long quote. This is a long quote. This is a long quote</blockquote>
This is a short quote
<q>Short quote wow, short quote</q>
<hr />Practice deleting or adding text effects
<p>There are <del>twenty</del><ins>twelve</ins> in a dozen</p>
</body>
</html>

It must be super simple, hehe, just keep going!

<<:  CSS realizes the mask effect when the mouse moves to the image

>>:  How to reduce the memory and CPU usage of web pages

Recommend

How to implement a binary search tree using JavaScript

One of the most commonly used and discussed data ...

Docker adds a bridge and sets the IP address range

I don't know if it's because the binary d...

MySQL online log library migration example

Let me tell you about a recent case. A game log l...

Detailed explanation of how Nginx works

How Nginx works Nginx consists of a core and modu...

Springboot+Vue-Cropper realizes the effect of avatar cutting and uploading

Use the Vue-Cropper component to upload avatars. ...

How to create WeChat games with CocosCreator

Table of contents 1. Download WeChat developer to...

Solution to mysql server 5.5 connection failure

The solution to the problem that mysql cannot be ...

Detailed explanation of 10 common HTTP status codes

The HTTP status code is a 3-digit code used to in...

Detailed explanation of the use of grid properties in CSS

Grid layout Attributes added to the parent elemen...

Examples of using html unordered list tags and ordered list tags

1. Upper and lower list tags: <dl>..</dl...

Solution to MySQL service 1067 error: modify the mysql executable file path

Today I encountered the MySQL service 1067 error ...

Summary of Common Mistakes in Web Design

In the process of designing a web page, designers...

How to use vs2019 for Linux remote development

Usually, there are two options when we develop Li...

Detailed steps for porting busybox to build a minimal root file system

Busybox: A Swiss Army knife filled with small com...