html - DIV tag is acting as an INLINE instead of BLOCK -
Learning about HTML and everything is recovering but I have a problem that is very annoying to me.
< / P>
They say that the divisive tag is the level of a block, so anything can happen that a new line break starts between the div tag and ends with one.
This is not true! And its disappointing me!
The raw code
& lt; Div & gt; This template is in a div tag. & Lt; / Div & gt; & Lt; Div & gt; This is a plain text that has a div tag. & Lt; / Div & gt; & Lt; Div & gt; This is a plain text that has a div tag. & Lt; / Div & gt; & Lt; P & gt; This is the paragraph which is not in a set of devail tags. & Lt; / P & gt; & Lt; Div & gt; This is a plain text that has a div tag. & Lt; / Div & gt; & Lt; Div & gt; This is a plain text that has a div tag. & Lt; / Div & gt; Displaying here! WTF!
This is plain text in a div tag. It is plain text in a div tag, it is a plain text which is a div tag, this is the paragraph which is not in the set of divil tag. Simple text in the div tag is plain text in a div tag, it is plain text in a div tag only begins with paragraph and ends with a new line break Acting as it is a block level element
but "in a set of this divan tag Is a plain text "lines do not start or end with a new line break! And they are in a set of divis tags! What I should not understand now should be the block!
And where im learning is the source of html, there is an example of a layout with div tags which is a reason to confuse any part of this layout and end it with a new line break! Also cold for this
& Lt; / Div & gt; & Lt; Div id = "menu" style = "background-color: # ffd700; height: 200px; width: 100px; float: left;" & Gt; & Lt; P & gt; Menu & lt; / P & gt; & Lt; Br> Html & lt; Br> CSS & lt; Br> JavaScript & lt; / Div & gt; & Lt; Div id = "content" style = "background-color: #EEEEEE; height: 200px; width: 400px; float: left;" & Gt; The content goes here & lt; / Div & gt; & Lt; Div id = "footer" style = "background-color: # FFA500; clear: both; text-line: center;" & Gt; Copyright © W3Schools.com & lt; / Div & gt; & Lt; / Div & gt; & Lt; / Body & gt; & Lt; / Html & gt; Only once a trail of the linebreak was with the H1 tag and he used the margin below: 0 to move the line down, at the top and next part of this Why are the other parts in the other parts as they are inline elements when they are in their own diva tags ... it disappoints me! I want to pull my hair out!
You need to understand that some of these HTML tags, especially the text container i.e. headers, paragraphs Etc. come with zero default margin. If you are not well with these transfers, you will not leave them in style, otherwise they just assume their default. Try adding margins to your paragraph tags to achieve your desired effect
Comments
Post a Comment