-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjs_string_html_wrapper_methods.html
More file actions
87 lines (68 loc) · 2.99 KB
/
Copy pathjs_string_html_wrapper_methods.html
File metadata and controls
87 lines (68 loc) · 2.99 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<title>String Wrapper Methods | JS CodeyLuwak</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="./img/keyboard-5-16.ico">
<link rel="stylesheet" href="./style.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Barlow:ital,wght@0,400;0,700;1,400;1,700&family=Fira+Mono:wght@400;500;700&family=Roboto:ital,wght@0,400;0,700;1,400;1,700&display=swap" rel="stylesheet">
</head>
<body>
<script>
</script>
<!--Clickable Page Title-->
<a href="./index.html"><h1>JavaScript</h1></a>
<h2>String HTML Wrapper Methods</h2>
<p class="alert">These are deprecated methods. Avoid using.</p>
<p>HTML wrapper methods return a string wrapped inside an HTML tag. These are not standard methods, and may not work as expected.</p>
<ul>
<code>
<li>anchor()</li>
<li>big()</li>
<li>blink()</li>
<li>bold()</li>
<li>fixed()</li>
<li>fontcolor()</li>
<li>fontsize()</li>
<li>italics()</li>
<li>link()</li>
<li>small()</li>
<li>strike()</li>
<li>sub()</li>
<li>sup()</li>
</code>
</ul>
<p>Examples:</p>
<div class="formula"><code><span class="variable">string</span>.bold()</code></div>
<pre class="js-codebox">
let text = "Hello World!";
let result = text.bold();
result; // '<b>Hello World!</b>'
</pre>
<div class="formula"><code><span class="variable">string</span>.fontcolor("<span class="variable">color</span>")</code></div>
<pre class="js-codebox">
let text = "Hello World!";
let result = text.fontcolor("green");
result; // '<font color="green">Hello World!</font>'
</pre>
<div class="formula"><code><span class="variable">string</span>.fontsize("<span class="variable">size</span>")</code></div>
<pre class="js-codebox">
let text = "Hello World!";
let result = text.fontsize(6);
result; // '<font size="6">Hello World!</font>'
</pre>
<div class="formula"><code><span class="variable">string</span>.italics()</code></div>
<pre class="js-codebox">
let text = "Hello World!";
let result = text.italics();
result; // '<i>Hello World!</i>'
</pre>
<p>Read more: <a href="https://www.w3schools.com/jsref/jsref_obj_string.asp#:~:text=String%20HTML%20Wrapper%20Methods" target="_blank">w3schools - String HTML Wrapper Methods</a></p>
<!--Footer - don't change below-->
<a href="#top"><hr></a>
<div class="nav-bar"><a href="./index.html" class="nav-button-rev" style="margin: auto">Home</a></div>
</body>
</html>