HTML
HTML
<!DOCTYPE html>
<html>
<head>
<title>My First Web Page</title>
</head>
<body>
<h1>This is my first web page!</h1>
</body>
</html>
The <!DOCTYPE html> tag tells the web browser which version of HTML to
use. The <html> tag defines the beginning of the HTML document. The
<head> tag defines the head of the HTML document, which contains
information about the document, such as the title. The <body> tag defines the
body of the HTML document, which contains the actual content of the page.
The <h1> tag is a heading tag that is used to create a heading. The This is
my first web page! text is the content of the heading.
There are many other tags that can be used in HTML. For a complete list of
HTML tags, you can refer to the W3Schools HTML reference:
https://www.w3schools.com/tags/.
HTML comments
HTML comments are used to provide information about the HTML document
that is not visible to the user. Comments are enclosed in <!-- and --> tags.
For example, the following comment would provide information about the
author of the HTML document:
HTML can be used to format text and set fonts. The <p> tag is used to create
a paragraph. The <b> tag is used to make text bold. The <i> tag is used to
make text italic. The <font> tag is used to set the font of the text.
For example, the following code would create a paragraph of bold, italic text in
the Arial font:
Color
HTML can be used to set the color of text and backgrounds. The <font
color="color_code"> tag is used to set the color of the text. The <body
bgcolor="color_code"> tag is used to set the color of the background.
Hyperlink
For example, the following code would create a hyperlink to the Google
homepage:
<a href="https://www.google.com">Google</a>
Lists
HTML can be used to create lists of items. There are three types of lists:
ordered lists, unordered lists, and definition lists.
Ordered lists are lists of items that are numbered sequentially. The <ol> tag is
used to create an ordered list. The <li> tag is used to create an item in the
list.
For example, the following code would create an ordered list of the days of
the week:
<ol>
<li>Sunday</li>
<li>Monday</li>
<li>Tuesday</li>
<li>Wednesday</li>
<li>Thursday</li>
<li>Friday</li>
<li>Saturday</li>
</ol>
Unordered lists are lists of items that are not numbered. The <ul> tag is used
to create an unordered list. The <li> tag is used to create an item in the list.
For example, the following code would create an unordered list of the colors
of the rainbow:
<ul>
<li>Red</li>
<li>Orange</li>
<li>Yellow</li>
<li>Green</```