HTML is short for HyperText Mark-up language. HTML is used to write the content of a website. It is called a HyperText because the text have links or hyperlinks to other texts. It is called a mark-up language because the language uses tags to mark text as specific type of text. Example, the statement <h1>Web development</h1> uses the HTML tag <h1> to mark the text “web development” to be formatted with a certain font. This is an h1 header font.
HTML Elements
HTML elements provide semantic meaning. They also provide machine readability to the content in the page. An html element typically consists of an opening tag and a closing tag. The tag comprises the element name sandwiched between two opposite facing angle brackets.
Empty or void elements
These are html elements that do not have closing tags or any content. Examples include <img>, <meta> , <link> , <input>
1 2 |
<img src="passport.jpg" alt="my passport picture" width="500" height="600"> <link rel="stylesheet" href="styles.css"> |
HTML elements names are simple descriptive names for the content they contain. Example include header, footer, audio, video etc
HTML element tags consist of the element name sandwiched between two opposite facing angle brackets. Examples include <header></header>, <footer></footer>, <audio></audio>, <video></video>
Thus, the element normally have an opening and a closing tag. The opening tag comprises the elements name sandwiched between two opposite angle brackets. Example include <header> , <footer>
The closing tag (Example, </header> ) is identical to the opening tag, <header> , except that there is a forward slash between the opening angled bracket and the element.
Hello World using HTML
1 2 3 4 5 6 7 8 9 10 |
<!DOCTYPTE html> <html> <head> <title>This is the title of the document</title> </head> <body> <h1>This is the heading</h1> <p>Hellow World</p> </body> |