To display an HTML page correctly, a web browser must know which character set to use.
The HTML charset Attribute
The character set is specified in the <meta>
tag:
<meta charset="UTF-8">
To display an HTML page correctly, a web browser must know which character set to use.
The character set is specified in the <meta>
tag:
<meta charset="UTF-8">
Emojis are characters from the UTF-8 character set: 😄 😍 💗
Char | Dec | Hex | Name |
---|---|---|---|
😀 | 128512 | 1F600 | GRINNING FACE |
Example
<p style="font-size:100px">😜</p> <p>I will display 😜</p> <p>I will display 😜</p>
Symbols or letters that are not present on your keyboard can be added to HTML using entities.
HTML entities were described in the previous chapter.
Many mathematical, technical, and currency symbols, are not present on a normal keyboard.
To add such symbols to an HTML page, you can use the entity name or the entity number (a decimal or a hexadecimal reference) for the symbol:
Reserved characters in HTML must be replaced with entities:
Some characters are reserved in HTML.
If you use the less than (<) or greater than (>) signs in your HTML text, the browser might mix them with tags.
Entity names or entity numbers can be used to display reserved HTML characters.
Entity names look like this :
&entity_name;
Responsive web design is about creating web pages that look good on all devices!
A responsive web design will automatically adjust for different screen sizes and viewports.
Responsive Web Design is about using HTML and CSS to automatically resize, hide, shrink, or enlarge, a website, to make it look good on all devices (desktops, tablets, and phones).
Websites often display content in multiple columns (like a magazine or a newspaper).
See the Pen
HTML – Layout Elements and Techniques by Iampsp.com (@iampsp)
on CodePen.
The HTML <head>
element is a container for the following elements: <title>
, <style>
, <meta>
, <link>
, <script>
, and <base>
.
The <head>
element is a container for metadata (data about data) and is placed between the <html>
tag and the <body>
tag.
HTML metadata is data about the HTML document. Metadata is not displayed on the page.
Metadata typically define the document title, character set, styles, scripts, and other meta information.
JavaScript makes HTML pages more dynamic and interactive.
See the Pen
HTML JavaScript by Iampsp.com (@iampsp)
on CodePen.
An HTML iframe is used to display a web page within a web page.
The HTML <iframe>
tag specifies an inline frame.
An inline frame is used to embed another document within the current HTML document.
<iframe src="url" title="description"></iframe>
Tip: It is a good practice to always include a
attribute for the
title<iframe>
. This is used by screen readers to read out what the content of the iframe is. Continue reading HTML Iframes