Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does the HTML5 standard recommend inserting a newline after the <html> start tag?

Tags:

html

According to the HTML5 Standard:

It is suggested that newlines be inserted after the DOCTYPE, after any comments that are before the root element, after the html element's start tag (if it is not omitted), and after any comments that are inside the html element but before the head element.

What is the reasoning behind this recomendation? Is there a difference between writing

<!DOCTYPE html>
<html>
<head>...

and

<!DOCTYPE html><html><head>...

?

like image 865
hugomg Avatar asked Nov 27 '13 19:11

hugomg


People also ask

Which tag is used to insert a new line in HTML?

The <br> HTML element produces a line break in text (carriage-return).

Which of the following tag is used when we want to start a new line but do not want to start a new paragraph?

Tip #1: Use <br> tags to create line breaks in text, instead of using multiple paragraphs or other elements.

How do you start a new line in HTML?

To do a line break in HTML, use the <br> tag. Simply place the tag wherever you want to force a line break. Since an HTML line break is an empty element, there's no closing tag.

Which tag can be used to start text from the next line?

The <br> tag in HTML document is used to create a line break in a text.


1 Answers

It just helps improve readability, the code is processed exactly the same way.

like image 136
Zenithik Avatar answered Oct 06 '22 00:10

Zenithik