USING TAGS
Include the following in the page
<!DOCTYPE html> <html> <body> WELCOME TO MY PAGE </body> </html>
<!DOCTYPE html>
- specifies the type of webpage is html
- it instructs the web browser which version of html is being used, html indicates HTML5
- if document type declaration is not specified, browser may behave in a peculiar way
<html> the opening tag, denotes the beginning of the html document
</html> the closing tag, denotes the end of html document
- whatever is written between will be considered as html document
<body> denotes the beginig of the body of the html page
</body> denotes the end of the body
- So whatever you have typed now within the <body> and </body>, is the body
- WELCOME TO MY PAGE is the body here, and displayed in the browser window
- </html> </body> - closes the respective elements
- All the tag do not have the closing tags. there are certain tags which do not have the closing tags
- Tags which do hold any contents will close themselves. So they do not need a separate closing tag
eg : <br> - denotes the line break
it doesnt wrap any content
this might also be written like <br/>
it is a self closing tag. that mean, closing by itself.
generally used in xhtml codingxhtml is another version of html based on another markup lanuage xml
- Any tag which has content must be closed
- Syntax : opening tag -> content -> closing tag
- This makes the code easier to understand
No comments:
Post a Comment