Before learning the fundamental of HTML, we all should understand the role of HTML (Hypertext Markup Language) in this entire journey of Web Development.
For developing the front end of any website three languages play a very important role and they are HTML, CSS, and JavaScript. HTML is used to structure and describe the content of the web page, CSS is used to handle the presentation and design part of any web page and JavaScript is the programming language used to add dynamic effects and web applications.
What is HTML?
HTML stands for HyperText Markup Language, it is a markup language used by developers to give structure to the web page and it is not a programming language. HTML consists of elements that describe the different types of content like paragraphs, links, headings, images, videos, etc. Our web browsers can understand HTML and render the HTML code as a website.
Markup Language is those languages that follow a standard text encoding system with some set of symbols that decide the structure or your text document of a web page. (alert-passed)
What is HTML Element?
An HTML element starts with one starting tag some content and one ending tag. Everything including from starting tag to the ending tag is considered one element (All HTML element does not always require a closing tag).
Now let's understand the basic syntax of an HTML document shown below:
The output of Below HTML Code |
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Title of Web Page - AlgoLesson</title> </head> <body> <h1>Heading of the Website</h1> <p>This is a paragraph.</p> </body> </html>
- The first line of code <!DOCTYPE html> tells that the given document is an HTML5 document.
- The <html lang="en"> is the root element and all other element is going to lie inside this root tag lang="en" is used to specify the language of the element's content and "en" stand for the English language like this you can check of other languages also.
- The <head> contains meta information about the HTML page.
- The <meta charset="UTF-8"> defines the character encoding for HTML documents and from HTML5 onward it is suggested to use the UTF-8 character set because covers almost all characters and symbols.
- The line <meta name="viewport" content="width=device-width, initial-scale=1.0"> is an instruction to the browser on how to control the dimension and scaling of the webpage. The viewport is defined they are visible to the user base on the device they are using. The "width=device-width is used to set the web page to follow the screen size of the device and initial-scale=1.0 is sued to set the initial zoom level when the web page load for the first time.
- The <title> is used to specify the title of the web page, which is visible on the title of the page.
- This <body> is the most important tag because any content we are adding here is going to be visible to the user like images, paragraphs, headings, etc.
- The <h1> is a large heading element like this we have more heading tags h2, h3, h4, h5, and h6.
- The <p> is a paragraph element used to represent paragraphs.
👉Support Us by Sharing our post with others if you really found this useful and also share your valuable feedback in the comment section below so we can work on them and provide you best 😊.(alert-success)
No comments:
Post a Comment