-
Notifications
You must be signed in to change notification settings - Fork 0
/
03-Attributes, styles.html
64 lines (44 loc) · 2.21 KB
/
03-Attributes, styles.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>03-Attributes, styles</title>
</head>
<body>
<h2>Attributes</h2>
<p>Attributes in HTML provide additional information about HTML elements and are always included in the opening tag. They consist of a name and a value, separated by an equal sign. For example, in `a href="https://www.example.com"`, the `href` attribute specifies the hyperlink's destination. Attributes enhance the functionality, appearance, and accessibility of HTML elements.</p>
<h2>Styles</h2>
<p>This is a <strong>strong</strong> and <b>bold</b> text.</p>
<p>This is an <i>italic</i> and <em>emphasized</em> text.</p>
<p>This text is <mark>highlighted</mark>.</p>
<p>This is an <u>underlined</u> text.</p>
<p>This text is <small>smaller in size</small>.</p>
<p>This is a <del>deleted</del> and <ins>inserted</ins> text.</p>
<p>This is a <sub>subscript</sub> and <sup>superscript</sup> text.</p>
<h2>Anchor tag</h2>
<p>
The <code><a></code> (anchor) tag is used for creating hyperlinks.
It has various attributes to control link behavior.
</p>
<p>
<strong>Example 1:</strong> Open link in a new tab/window using <code>target="_blank"</code>.
<a href="https://www.example.com" target="_blank">Visit Example.com</a>
</p>
<p>
<strong>Example 2:</strong> Create a mailto link using <code>href="mailto:"</code>.
<a href="mailto:[email protected]">Send Email</a>
</p>
<p>
<strong>Example 3:</strong> Use the <code>title</code> attribute for additional information.
<a href="https://www.example.com" title="Go to Example.com">Visit Example.com</a>
</p>
<p>
<strong>Example 4:</strong> Use <code>href="#"</code> to create an anchor link within the same page.
<a href="#section-1">Jump to Section 1</a>
</p>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<h2 id="section-1">Section 1</h2>
<p>This is the content of Section 1.</p>
</body>
</html>