Intro to HTML
What is HTML?
Hypertext Markup Language (HTML) is the standard markup language for creating web pages. A basic webpage is a document that ends with the .html extension. A website (such as this one) will have many .html documents. These documents are put onto a web server and when a user navigates to them via a browser(Chrome, Firefox, etc.) the document is then rendered onto their screen.
HTML elements are the building blocks of web pages and are represented by tags. Tags mostly come in pairs and are element names surrounded by angle brackets. A few tags are listed below.
||Defines the document to be HTML5|
||This is the root element of the HTML page|
||Contains metadata information about the document|
||Title of the document|
||Contains the displayable content|
||Defines a heading tag. h1 is the largest, h6 is the smallest|
||Creates a paragraph|
Let's use these tags to create an HTML document:
<!DOCTYPE html> <html> <head> <title>Title goes here</title> </head> <body> <h1>Heading</h1> <p>This is a paragraph</p> </body> </html>
If you were to copy the html document above and save it on your computer as webpage.html and then open it with a browser, you would see the page get rendered like this:
For a full list of HTML elements, visit The World Wide Web Consortium (W3C)