-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathf1.html
95 lines (89 loc) · 4.15 KB
/
f1.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<!DOCTYPE html>
<html>
<head>
<title>HTML Introduction</title>
<link rel="shortcut icon" sizes="200*200" type="image/x-icon" href="logo1.jpg"></head>
<body style="background-color: aliceblue;color:rgb(90, 46, 194)">
<h2>What is HTML?</h2>
<ul>
<li>HTML stands for Hyper Text Markup Language</li>
<li>HTML is the standard markup language for creating Web pages</li>
<li>HTML describes the structure of a Web page</li>
<li>HTML consists of a series of elements</li>
<li>HTML elements tell the browser how to display the content</li>
<li>HTML elements label pieces of content such as "this is a heading", "this
is a paragraph", "this is a link", etc.</li>
</ul>
<hr>
<h2>A Simple HTML Document</h2>
<div class="w3-example">
<h3>Example</h3>
<div class="w3-code notranslate htmlHigh"><pre style="background-color:azure; style="background-color:azure; style="background-color:azure;">
<!DOCTYPE html><br>
<html><br><head><br><title>Page Title</title><br>
</head><br>
<body><br><br><h1>My First Heading</h1><br><p>My first paragraph.</p><br><br>
</body><br></html>
</pre>
</div>
<a target="_blank" href="f1-1.html" class="w3-btn w3-margin-bottom" title="HTML Introduction"><button style="background-color:rgb(115, 126, 226);">Try it Yourself</button> »</a>
</div>
<h3>Example Explained</h3>
<ul>
<li>The <code class="w3-codespan"><!DOCTYPE html></code> declaration defines
that this document is an HTML5 document</li>
<li>The <code class="w3-codespan"><html></code> element is the root element of an HTML
page</li>
<li>The <code class="w3-codespan"><head></code> element contains meta information about the
HTML page</li>
<li>The <code class="w3-codespan"><title></code> element specifies a title for the
HTML page (which is shown in the browser's title bar or in the page's tab)</li>
<li>The <code class="w3-codespan"><body></code> element defines the
document's body, and is a container for all the visible contents, such as
headings, paragraphs, images, hyperlinks, tables, lists, etc.</li>
<li>The <code class="w3-codespan"><h1></code> element defines a large heading</li>
<li>The <code class="w3-codespan"><p></code> element defines a paragraph</li>
</ul>
<hr>
<h2>What is an HTML Element?</h2>
<p>An HTML element is defined by a start tag, some content, and an end tag:</p>
<div style="font-size:20px;padding:10px;margin-bottom:10px;">
<span style="color:brown"><span style="color:mediumblue"><</span>tagname<span style="color:mediumblue">></span></span>Content goes here...<span style="color:brown"><span style="color:mediumblue"><</span>/tagname<span style="color:mediumblue">></span></span>
</div>
<p>The HTML <strong>element</strong> is everything from the start tag to the end tag:</p>
<div style="font-size:20px;padding:10px;margin-bottom:10px;">
<span style="color:brown"><span style="color:mediumblue"><<span style="color:brown">h1</span>></span></span>My
First Heading<span style="color:brown"><span style="color:mediumblue"><</span>/h1<span style="color:mediumblue">></span></span>
</div>
<div style="font-size:20px;padding:10px;margin-bottom:10px;">
<span style="color:brown"><span style="color:mediumblue"><</span>p<span style="color:mediumblue">></span></span>My first paragraph.<span style="color:brown"><span style="color:mediumblue"><</span>/p<span style="color:mediumblue">></span></span>
</div>
<table class="ws-table-all notranslate">
<tr>
<th>Start tag</th>
<th>Element content</th>
<th>End tag</th>
</tr>
<tr>
<td><h1></td>
<td>My First Heading</td>
<td></h1></td>
</tr>
<tr>
<td><p></td>
<td>My first paragraph.</td>
<td></p></td>
</tr>
<tr>
<td><br></td>
<td><em>none</em></td>
<td><em>none</em></td>
</tr>
</table>
<div class="w3-panel w3-note">
<p><strong>Note:</strong> Some HTML elements have no content (like the <br>
element). These elements are called empty elements. Empty elements do not have an end tag!</p>
</div>
<hr>
</body>
</html>