What is HTML?
|
visualization
<!DOCTYPE html> declaration defines that this document is an HTML5 document <html> element is the root element of an HTML page
</html> is the closing tag for <html> |
HTML Layout Elements
<Header
|
- <header> Defines a header for a document or a section
- <nav> Defines a set of navigation links
- <section> Defines a section in a document
- <article> Defines independent, self-contained content
- <aside> Defines content aside from the content like a sidebar
- <footer> Defines a footer for a document or a section
- <details> Defines addition details that the user can open and close on demand
- <summary> Defines a heading for the <details> element
Simple HTML Document
<!DOCTYPE html>
<html>
<head>
<title>
Page title
</title>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph</p>
</body>
</html>
Explained
- The <!DOCTYPE html> declaration defines that this document is an HTML5 document
- The <html> element is the root elemtn of an HTML page
- The <head> element contains meta information about the HTML page
- The <title> element specifies a title for the HTML page which will show in the browser's title bar or in the page's tab.
- The <body> element defines the document's body, is a container for all the visible contents, such as headings, paragraphs, images, heperlinks, tables, lists, etc.
- The <h1> element defines a large heading.
- The <p> element defines a paragraph
What is an HTML Element?
- Defined by a start tag <html>
- Add some content
- Then you add an end tag </html>
- My very first web page
It will look like this in code. <html> My very first web page </html>
This on your page My very first web page