HTML documents <! DOCTYPE html> type must start with announcement.
The HTML document starts with the <html> start tag and ends with </ html> end tag.
The visible part of the HTML document is between the <body> start tag and the </ body> end tag.
<!DOCTYPE html> <html> <body> <h1>First webstudy Heading</h1> <p>First webstudy paragraph.</p> </body> </html>
Html heading tag
The document always starts with headings. You can use different things for your heading. There are also six levels of headings in the HTML language, which use the <h1>, <h2>, <h3>, <h4>, <h5>, and <h6> elements. When displaying any headings, the browser keeps adding a row and a line after that line as you put the heading elements.
<! DOCTYPE html> <Html> <Head> <Title> heading title </ title> </ Head> <Body> <h1> this is heading 1 </ h1> <h2> This is heading 2 </ h2> <h3> This is heading 3 </ h3> <h4> this is heading 4 </ h4> <h5> this is heading 5 </ h5> <h6> This is heading 6 </ h6> </ Body> </ Html>
this is heading 1
this is heading 2
this is heading 3
this is heading 4
this is heading 5
this is heading 6
<P> The tag provides a way to structure your text in various paragraphs. Each paragraph of the text, as shown below, should go between <p> and one stop </ p> tag .
<! DOCTYPE html> <Html> <Head> <Title> paragraph</ title> </ Head> <Body> <p> The first paragraph of the text. </ p> <p> The second paragraph of the lesson is given here. </ p> <p> The third paragraph of the text is given here. </ p> </ Body> </ Html>
- The first paragraph of the text.
- The second paragraph of the lesson is given here.
- The third paragraph of the text is given here.
Line break tag in HTML
If you use the <br /> element, then after that anything is started from the next line. This tag is a empty element, where you do not need to open and close the tag, because there is nothing between them.
<br /> There is a place between the letter b and the forward slash in the tag. If you leave this place, then the browser will have trouble presenting the line breaks, while if you miss the forward slash character and only use it, it will not be considered in XHTML.
<! DOCTYPE html> <Html> <Head> <Title> Line Break Example </ title> </ Head> <Body> <p> Hello <br /> You have given your assignment ontime. <br /> Thank you <br /> webstudy </ p> </ Body> </ Html>results -
- You have given your assignment ontime.
- Thank you webstudy