Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

HTML

From Simple English Wikipedia, the free encyclopedia
HTML
(HyperText Markup Language)
Filename extension.html, .htm
Internet media typetext/html
Type codeTEXT
Uniform Type Identifier (UTI)public.html
Developed byWorld Wide Web Consortium &WHATWG
Type of formatMarkup language
Extended fromSGML
Extended toXHTML
StandardISO/IEC 15445
W3C HTML 4.01
W3C HTML 5 (draft)

HyperText Markup Language (HTML) is a markup language used to create web pages. It was created in 1990 by SirTim Berners-Lee, a British computer scientist who is credited with inventing theWorld Wide Web.[1]Webpages can include writing, links, pictures, and even sound andvideo. HTML tellsweb browsers what webpages should look like. HTML also adds meta information to webpages. Meta information is information about a webpage e.g., the name of the person who created the page. Web browsers usually do not show meta information.

HTML is often used withCascading Style Sheets (CSS) andJavaScript. CSS is used to change the way HTML looks. JavaScript tells websites how to behave. It can also change HTML and CSS.

HTML is made by theWorld Wide Web Consortium (W3C). There are many versions of HTML. As of September 2018, the current standard of HTML is calledHTML 5 and is specifically at version 5.2.

Tags

[change |change source]

HTML uses "elements" to let the browser know how a webpage is made of. Elements are shown as "tags" in the code, written with anglebrackets:<example>. Tagsusually come in pairs: anopening tag defines the start of a block of content and aclosing tag defines the end of that block of content. There are many kinds of tags, and each one has a different purpose. SeeBasic HTML Tags below for tag examples.

Some tags only work in certain browsers. For example, the<menuitem> tag, which was used to make something appear when the personpresses the right button of themouse, only worked on theMozilla Firefox browser until version 85.[2] Other browsers simply ignore this tag and display the writing normally. Many web page creators avoid using these "non-standard" tags because they want their pages to look the same with all browsers.

Example

[change |change source]

Here is an example page in HTML with "Hello world!".

<!DOCTYPE html><html><head><title>Hi world!</title></head><body><p>Hello world!</p></body></html>

The Text between<html> and</html> describes the web page, and the text between<body> and</body> is the page content.<title>This is a title</title> defines the browser page title.

Example HTML tags

[change |change source]

Here are some example HTML tags:[note 1]

Tag nameNameFunctionCode Example
<!DOCTYPE>DoctypeDefines the Document type
<!DOCTYPE html>
<html>HTMLDefines an HTML document and starts an HTML document.
<html>All code</html>
<head>HeadContains any code that is not used to display elements on the webpage
<head></head>
<title>TitleDefines the title of the webpage (shown on thetab) and is entered within the<head>
<title>Webpage</title>
<body>BodyContains the visible elements of the webpage.
<body>Html tags</body>
<h1> to<h6>HeadingsHeadings of various sizes (<h1> being the largest)
<h1>Heading</h1>
<p>ParagraphDefines a paragraph of text
<p>TEXT</p>
<a>AnchorCreates active links to other web pages
<ahref="www.domain.com">Visit our site</a>
<img>ImageDisplays an image on the page
<imgsrc="ImageUrl"alt="Text displayed if image is not available">
<br>BreakInserts a single line break
Text<br> Text
 
<center>CenterMoves content to the center of the page
<center>Code</center>
<script>ScriptCreates ascript in the webpage, usually written inJavaScript
<script>alert("Hello World!")</script>

Notes

[change |change source]
  1. There is a full list of HTML elements here:[3]

References

[change |change source]
  1. singhal, tanu (2023-05-18)."Does HTML is a programming language or a markup language? - CoderShot".codershot. Retrieved2023-05-20.
  2. "MDN Web Docs". 2019-12-25. Retrieved2020-01-15.
  3. "HTML elements reference".MDN. Retrieved6 August 2020.
Retrieved from "https://simple.wikipedia.org/w/index.php?title=HTML&oldid=10536506"
Categories:

[8]ページ先頭

©2009-2026 Movatter.jp