What is HTML?
The HyperText Markup Language or HTML is the standard markup language for documents designed to be displayed in a web browser. It can be assisted by technologies such as Cascading Style Sheets (CSS) and scripting languages such as JavaScript.Web browsers receive HTML documents from a web server or local storage and render the documents into multimedia web pages. HTML describes the structure of a web page semantically and originally included cues for the appearance of the document.
HTML elements are the building blocks of HTML pages. With HTML constructs, images and other objects such as interactive forms may be embedded into the rendered page. HTML provides a means to create structured documents by denoting structural semantics for text such as headings, paragraphs, lists, links, quotes, and other items. HTML elements are delineated by tags, written using angle brackets. Tags such as </img> and </input> directly introduce content into the page. Other tags such as <p> surround and provide information about document text and may include other tags as sub-elements. Browsers do not display the HTML tags but use them to interpret the content of the page.
Tim Berners Lee |
- Opening tags
- Closing tags
Opening tags contains <> and closing tags contain </>. Examples of tags are <br>(to break the line and starts from the next line),<h1>(heading tag), etc.
There are two types of elements in html:-
- Empty elements-Elements which only have an opening tag and do not have a closing tag for example-<br>,<link>,<img>, etc.
- Normal elements-Elements which have both opening and closing tags for example-<p></p>,<b></b>etc. It is a must to close these types of tags to prevent errors in our programs.
A simple Html programme:-
At the begining of every html program it is must to add <!DOCTYPE html>earlier we use <html> instead of this but in html5 we use <!DOCTYPE html> instead of <html>.It tells the web browser that we are using html.We close it using </html> tag.
Then <head> tag heading tag is there.Inside it we write <title>tag (which is for the title of the webpage),<meta>tag,<style>tag,<script> tag.One thing to keep in mind is to close the normal tags as it may cause an error in our program.
Then <body></body> tag is there.As the name suggests it is the body of our webpage. Inside it, we use a lot of tags. Here we have used <p></p> tag which is for writing paragraph.To know more about different tags visit this page.
Some key points to remember:-
- HTML stands for Hyper Text Markup Language
- HTML is the standard markup language for creating Web pages
- HTML describes the structure of a Web page
- HTML consists of a series of elements
- HTML elements tell the browser how to display the content
- HTML elements label pieces of content such as "this is a heading", "this is a paragraph", "this is a link", etc.
very helpful
ReplyDeletePost a Comment