19. What is the use of <dl> tag in HTML?Answer:
The <dl> is a definition list tag used in HTML.
This tag is used with <dt> (defines terms/names) and <dd> (describes each term/name). The <dt> tag lists the item while <dd> describes it.
The <dl> tag defines a description list.
<dd>HyperText Markup Language</dd>
<dd>Cascading Style Sheets</dd>
20. What is the differece between HTML and XHTML?Answer:
HTML is application of Standard Generalized Markup Language(SGML) whereas XHTML is application of Extensible Markup Language(XML).
HTML is a static web page whereas XHTML is dynamic web page.
XHTML is strict when compared to HTML and does not allow user to do any mistake in coding and structure.
HTML is about displaying information whereas XHTML is about describing the information.
1. Head Section :
2. Body Section :
3. Head and Body both :
4. External File :
The <script> tag is used to include an external file. This tag is included in <head> ….. </head> section.
22. What do you know about GET and POST method in HTML?Answer:
- GET method data is encoded into a URL by the browser.
- The data is visible in the URL which allows it to be bookmarked and stored in web history.
- This method requests data from a specified resource.
- In GET method, the data is restricted to ASCII codes. Because URL lengths are limited there can be limitations on how much form data can be sent.
- GET requests should never be used when dealing with sensitive data because the requests remain in the browser history and the requests can be cached.
- In POST method, all the name value pairs are submitted in the message body of the HTTP request which has no restrictions on the length of the string.
- The data is not visible in the web browser bar.
- This method submits data to be processed to a specified resource.
- POST requests are never cached and the requests do not remain in the browser history and cannot be bookmarked.
23. What is the importance of HTML <!DOCTYPE>?Answer:
The doctype declaration is the first thing in an HTML document, before the <html> tag.
This is not an HTML tag; The <!DOCTYPE> is an instruction to the web browser about what version of the markup language the page is written in.
The doctype declaration refers to a Document Type Definition (DTD). The DTD specifies the rules for the markup language, so that the browsers can render the content correctly.