W3schools - HTML_Encode / Charset
찾으시는 정보가 있으시다면
주제별reference를 이용하시거나
우측 상단에 있는 검색기능을 이용해주세요
URL encode
Is another word for a web address
Can be composed of words(w3schools.com) or an Internet Protocol(IP) address(192.68.20.50)
URL
Uniform Resource Locator
Web browsers request pages from web servers by using a URL
URL is used to address a document(or other data) on the web
Web address syntax rule
- scheme://prefix.domain:port/path/filename
Explanation
-
scheme : defines the type of Internet service
-
prefix : defines a domain prefix
-
domain : defines the Internet domain name
-
port : defines the port number at the host
-
path : defines a path at the server
-
filename : defines the name of a document or resource
Common URL schemes
http(Hyper Text Transfer Protocol) : Common web pages, not encrypted
https(Secure Hyper Text Transfer Protocol) : Secure web pages, encryted
ftp(File Transfer Protocol) : Downloading or uploading files
file : A file on your computer
charset
To display an HTML page correctly, a web browser must know the char set used in the page
<meta charset="“UTF-8”" />
From ASCII to UTF-8
ASCII was the first char encoding standard
- It defined 128 different char that could be used on the internet(numbers, English letters, some special char)
ISO-8859-1 was the default char set for HTML4
- It supported 256 different char codes
ANSI(Windows-1252) was the original Windows char set
- It is identical to ISO-8859-1, except that ANSI has 32 extra chars
The HTML5 specification encourages web developers to use the UTF-8 char set,
- It covers almost all of the chars and symbols in the world
Entities
Char entities are used to display reserved chars in HTML
syntax
&entity_name; or &#entity_number;
<!-- An entity name is easy to remember, but browser may not support all entity names -->
Non-breaking space
-
A commonly used entity in HTML is
 
; -
That will not break into a new line
-
If you write 10 spaces in your text, the browser will remove 9 of them
-
To add real spaces to your text, use the
 
;
-