Author: @Valentyn Tupota
The doctype
declaration in HTML is used to specify the version of the HTML document being used. It is placed at the very beginning of an HTML document and is not an HTML tag. The doctype
declaration helps the web browser to display the web page correctly by telling it which version of HTML is being used in the document.
Here is a list of doctype declarations for different versions of HTML and SVG:
<!doctype html>
<!doctype html PUBLIC "-//W3C//DTD HTML 4.01//EN" "<http://www.w3.org/TR/html4/strict.dtd>">
<!doctype html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "<http://www.w3.org/TR/html4/loose.dtd>">
<!doctype html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "<http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd>">
<!doctype html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd>">
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "<http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd>">
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "<http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd>">
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "<http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd>">
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "<http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd>">
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.2//EN" "<http://www.w3.org/Graphics/SVG/1.2/DTD/svg.dtd>">