Skip to content

Commit 410a8ab

Browse files
committed
Small Element
1 parent c3a3378 commit 410a8ab

File tree

2 files changed

+47
-1
lines changed

2 files changed

+47
-1
lines changed

README.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2080,7 +2080,37 @@ We can set text direction in HTML in one of two ways:
20802080
<b><a href="#">↥ back to top</a></b>
20812081
</div>
20822082

2083-
#### Q. ***When is it appropriate to use the small element?***
2083+
## Q. ***When is it appropriate to use the small element?***
2084+
2085+
The `<small>` HTML element represents side-comments and small print, like copyright and legal text, independent of its styled presentation. By default, it renders text within it one font-size smaller, such as from `small` to `x-small`.
2086+
2087+
**Example**
2088+
2089+
```html
2090+
<!DOCTYPE html>
2091+
<html>
2092+
<head>
2093+
<title>Small Element</title>
2094+
</head>
2095+
<style>
2096+
small {
2097+
font-size: .7em
2098+
}
2099+
</style>
2100+
<body>
2101+
<p>MDN Web Docs is a learning platform for Web technologies and the software that powers the Web.</p>
2102+
<hr>
2103+
<p><small>The content is licensed under a Creative Commons Attribution-ShareAlike 2.5 Generic License.</small></p>
2104+
</body>
2105+
</html>
2106+
```
2107+
2108+
[Live Example](https://learning-zone.github.io/html-interview-questions/assets/files/small-element.html)
2109+
2110+
<div align="right">
2111+
<b><a href="#">↥ back to top</a></b>
2112+
</div>
2113+
20842114
#### Q. ***How do you serve a page with content in multiple languages?***
20852115
#### Q. ***What is the difference between `<section>` and `<div>`?***
20862116
#### Q. ***Where and why is the rel="noopener" attribute used?***

assets/files/small-element.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Small element</title>
5+
</head>
6+
<style>
7+
small {
8+
font-size: .7em
9+
}
10+
</style>
11+
<body>
12+
<p>MDN Web Docs is a learning platform for Web technologies and the software that powers the Web.</p>
13+
<hr>
14+
<p><small>The content is licensed under a Creative Commons Attribution-ShareAlike 2.5 Generic License.</small></p>
15+
</body>
16+
</html>

0 commit comments

Comments
 (0)