Simple line break <br/> question



You should probably attend a 4 year accredited school to learn how to getchyo tags right. PM me for a link. I've also got one if you want to be a cop and drive a lamborghini and carry a bazooka.
 
I'd probably say shit like that too if I didn't know how to fix it.

Here is how to fix it.

1. Go to fiverr
2. Find someone who knows what the fuck they are doing
3. Have them rewrite your shitty ass code
4. ?????????
5. PROFIT!
 
You're doing it wrong bro


5 REM **MY FIRST MONEY SITE**
10 POSITION 1,1
20 PRINT "Hello"
30 POSITION 2,1
40 PRINT " this is a test"


Now just rinse & repeat with

50 GOTO 10
 
Last edited:
Code:
<h1><span style="display: block">Hello</span> This is a test</h1>

beat me to it, do this (and move the style to your stylesheet)

Code:
<h1><span>Hello</span> This is a test</h1>

<style type="text/css">h1 span { display: block; }</style>
 
WF turned to a ****

yqqVF.jpg
 
I'm making a site and can't figure out why when I do this:

<p>hello<br/> this is a test</p>

I successfully get back:
hello
this is a test

But when it's an h1 tag like this:
<h1> Hello<br/> this is a test</h1>
it all reads as one line.

Thanks for the help in advance.

Let's look at what an H1 tag is meant for. H signifies "headline", the 1 signifies it's the most important section on the page. This means that any element on the same level as the h1, directly below it should be treated as the most important content on the page.

Now, if you were paying attention, "line" came right haver "head". Semantically, this means that H1 should all be on a single line... because it's a heading. Headings are short snippets to summarize a block of content.

Now, let's look at the W3C standard of what H1 is (you know, the people who are responsible for standardizing HTML code and how it's rendered):
Use <h1> for top-level heading

<h1> is the HTML element for the first-level heading of a document:

  • If the document is basically stand-alone, for example Things to See and Do in Geneva, the top-level heading is probably the same as the title.
  • If it is part of a collection, for example a section on Dogs in a collection of pages about pets, then the top level heading should assume a certain amount of context; just write <h1>Dogs</h1> while the title should work in any context: Dogs - Your Guide to Pets.
Unlike the title, this element can include links, emphasis and other HTML phrase elements.

If you noticed, they said "phrase elements" these don't include anything other than inline text formatting used to define what a bit of text is semantically.

So, stop being like a kid that ate paintchips his whole life that tries to put a square block through a round hole, and actually use tags like they're suppose to be used.

I suggest you get this book and learn how to style your pages properly.
 
Let's look at what an H1 tag is meant for. H signifies "headline", the 1 signifies it's the most important section on the page. This means that any element on the same level as the h1, directly below it should be treated as the most important content on the page.

Now, if you were paying attention, "line" came right haver "head". Semantically, this means that H1 should all be on a single line... because it's a heading. Headings are short snippets to summarize a block of content.

Now, let's look at the W3C standard of what H1 is (you know, the people who are responsible for standardizing HTML code and how it's rendered):


If you noticed, they said "phrase elements" these don't include anything other than inline text formatting used to define what a bit of text is semantically.

So, stop being like a kid that ate paintchips his whole life that tries to put a square block through a round hole, and actually use tags like they're suppose to be used.

I suggest you get this book and learn how to style your pages properly.

Jesus christ man, it says nothing about controlling how your headlines break or are formatted. If your headline is long enough that it spans two rows and you want to better control how it looks, there's absolutely no reason why you can't throw in a <br> or <br /> tag. I have no idea what the OP has done, but it should just work like that and isn't semantically incorrect. Some you fucks need to learn what semantics means... it has nothing to do with adding a <br> tag to your code or how that <br> tag is or isn't formatted.

Neither <br> nor <br /> is "semantically correct" because neither has anything to do with semantics. One is formatted correctly for a HTML doctype and one if formatted correctly for a XHTML doctype.

End of story.
 
Jesus christ man, it says nothing about controlling how your headlines break or are formatted.

Yes, it does.

A, EM, STRONG, DFN, CODE, SAMP, KBD, VAR, CITE, ABBR, and ACRONYM are all that should be allowed within the H tags based on the standards agreed upon by the W3C. Whether or not a BR or SPAN will render inside it is up to the individual browser developer.

All tend to allow SPAN, and I'm guilty of using it inside it at times, but it's not technically correct based on W3C standards.

If your headline is long enough that it spans two rows and you want to better control how it looks, there's absolutely no reason why you can't throw in a <br> or <br /> tag.

There's absolutely no reason why you can't do the same with CSS styling either.

I have no idea what the OP has done, but it should just work like that and isn't semantically incorrect. Some you fucks need to learn what semantics means... it has nothing to do with adding a <br> tag to your code or how that <br> tag is or isn't formatted.

I loves ya Fatbat and respect your knowledge on a variety of subjects, but you need to re-read your last sentence and then apply that logic to the one before it.

You're right, BR has no place inside an H tag because the standards dictate that since an H element is inline and should only contant text, links, or phrase elements, it shouldn't recognize a line break because the element is meant to contain an entire statement unseparated to describe the element immediately following it.

Neither <br> nor <br /> is "semantically correct" because neither has anything to do with semantics. One is formatted correctly for a HTML doctype and one if formatted correctly for a XHTML doctype.

End of story.

I agree.
 
All tend to allow SPAN, and I'm guilty of using it inside it at times, but it's not technically correct based on W3C standards.

You're right, it's not in the spec, but it still validates with the W3C validator.

There's absolutely no reason why you can't do the same with CSS styling either.

Correct, but creating an entirely new style to apply to a span or whatever seems like a bit overkill to me, but I've now read the spec on <br> and see that it should be done this way.

I loves ya Fatbat and respect your knowledge on a variety of subjects,
Why thank you.
but you need to re-read your last sentence and then apply that logic to the one before it.

I meant it from the point of view that I think a line break is neither semantically correct nor incorrect. It does not impart any meaning on what is being said, it's a formatting issue. I guess I should rethink that.