HomeХобби и стильRelated VideosMore From: EJ Media

HTML Tutorial for Beginners - 02 - Line breaks, spacing, and comments

2146 ratings | 446443 views
In this video we go over adding line breaks, spacing, and comments to your HTML code. HTML Source: http://pastebin.com/iNPvhaYE
Html code for embedding videos on your blog
Text Comments (186)
Mohammad Mohammadi (1 month ago)
Why do you use notpad? Notpad++ is better.
Mark George (1 month ago)
you are the best guy i 've ever seen
Hina LovlyBibi (1 month ago)
i have some question on that
Hina LovlyBibi (1 month ago)
in which time you contect me
Hina LovlyBibi (1 month ago)
sir i want to ask question
sunil kumar jaiswal (1 month ago)
Thank you Sir
Sean Mercer (2 months ago)
ctrl s and keep them on both on the screen.
olorin818 (2 months ago)
I'm really enjoying these. Short and simple, but its nice to see you demonstrating each step and explaining the rationale behind it. Thanks and keep up the good work.
Mayank Marwah (2 months ago)
i learn more here than in college.
Manshi Patel (2 months ago)
Sir what is nbsp. Will have to learn by heart or it is an acronym.
The Straight way (2 months ago)
sub me i will sub you
maedeh toosi (2 months ago)
i will appreciate you for this videos.thank you so much
Mridul Barman (2 months ago)
He is such a good teacher but hitting save as everytime is just cryngeworthy.
Martins Adedipe (3 months ago)
jinsar ali (3 months ago)
Awesome teaching
nitish yadav (4 months ago)
i am from india.you are good.
Nemrac Overbeek (4 months ago)
I love the videos!.. I was just wondering why you dont use notepad ++?
Amisha Gupta (4 months ago)
In place of an exclamation mark can we also write <comment> ??
Aleisa’s Advice (4 months ago)
I love you.
D Frontend (4 months ago)
bro just hit save you dont have to do save as every time :D
PABITRA SARKAR (4 months ago)
sir while save the code u can use ctrl+s also.....no need to go to file and do save as . because it's takes some extra time...i just try this thing in my laptop
Cherukumudi Saisrividhya (5 months ago)
I m greatful to u man. Super thanks. Keep rocking
SD Tech (5 months ago)
The lesson was awesome, but you don't need to save the edited document by (save as ) every time, You can save it by ( Ctrl + S )
Hina LovlyBibi (1 month ago)
sir here is one question
BÊST 4 PÛBG (5 months ago)
When I just skip this <!doctype html> then I am not able to see any changes in my web page ....so why should I write that?
foreverhilaryy (5 months ago)
LMFAO I remember removing the hidden comments in the layouts for MySpace of the people's names who made them! Ahah this is all bringing back memories!
Vaibhav Negi (5 months ago)
Why did you put the ! Back?
Inventor Creator (5 months ago)
I subbed you.
Zarif Azmy (5 months ago)
very good. God bless you!
natver patel (6 months ago)
boy oh boy what a lecture welldone thanks
Supernova X (6 months ago)
How did I line break on Youtube?
Md.Arifinur Rahman (7 months ago)
thank u sir...
BossATsleep (7 months ago)
easy to follow for a 14 year old who wants to learn to code
TheGhostWrecker (7 months ago)
The &nbsp Is that a space for code or for text? Because <p> hello John </p> will stay the same because it is marked as text right? Or will html remove all spaces in a text so you must type <p> hello &nbsp&nbsp John </p>
Wandering Recluse (4 months ago)
&nbsp is a character code for spaces. There are several different character codes for most things like letters, numbers and special characters (spaces, carriage returns, etc). When adding extra spaces between words is called whitespacing. The <p> tag ignores whitepspaces. Some tags like <pre> don't ignore it though. So you could use <pre>Test Test</pre> and that would output the text with whitespacing.
yuuki naenae (7 months ago)
i actually learned from your video tutorials than from my school. i owe you man, a big thanks for you! you're such a great teacher in this kind of field. thank you for teaching us!!
pratik das (8 months ago)
Pls make a video on makeing a full website complete programming so it will be great.
Abid Yassin (8 months ago)
what if i don't write the <body> and close it
Star Wars Theory 18 (8 months ago)
I’m only a child wanting to be a coder and you have helped me get started thank you
[Outlaw]MadPatStreaming (8 months ago)
If you don’t have Notepad ability to enter by left clicking the file open note pad and search test.html in documents or whatever you called it.
Tania Islam (9 months ago)
Thanks a lot. Keep it up.
MD zubayer (9 months ago)
thank you .....
Nabadeep Saikia (9 months ago)
Roamed the world but you r the best
Freelancer Hasan (9 months ago)
Forhadur Rahman (10 months ago)
Love it
gopal krishna (11 months ago)
awesome tutorials, But Why always only save as??
Ruchita Bajaj (11 months ago)
boy your awesome
Gulzhazira Akhmetova (11 months ago)
thank god someone can explain for real. great job .
Saber adam (11 months ago)
you are really a good teacher i learned alot from you
Low Kai Han (1 year ago)
I have found another way to keep the extra spaces within the texts, which is by using the white-space property in css. Read this for details: https://www.quackit.com/css/properties/css_white-space.cfm Should i use the html entity (which is the &nbsp mentioned in the video) or the white-space property in css to create extra spaces? Or both ways are fine?
Ben Sufiany (1 year ago)
I appreciate ur efforts
Jp. S (1 year ago)
nice this helps me a lot. what i was doing is <br></br> which put 2 break lines. Gladly i saw this video. thanks
Wandering Recluse (4 months ago)
An easier way to remember is to do <br />. It opens and closes the tag without adding additional effects, also makes it easier to see and understand that it needs no closing tag.
Vandana Deore (1 year ago)
I am not able to get the thing displayed in browser...its coming the same way I typed it in notepad..Help me
Vivash TV (1 year ago)
You are so good at teaching. Thank you very much.
MRINAL DAS (1 year ago)
I think we no need to save as every time.. Only save is enough.
Mallu K (1 year ago)
Dude, I honestly think if you used Notepad++ it would have been so much better. But whatever rocks your boat..
Dan Benjamin Robles (1 year ago)
edi okay
Smoke Weed (1 year ago)
Why do you need to label text <p> when it shows up the same not labled at all 4:16
gamer 34 (1 year ago)
Ryan Mikhail Pecho (1 year ago)
Abakar Adam (1 year ago)
I have just started to watch your videos, really best teacher ever may God bless you, keep it up.
zayed mahamud (1 year ago)
Excellent, Sir ..
Tanvir Ahmed (1 year ago)
hlw there, Nice tutorial. Very easy to understand. Btw. you could just click save the html file and reload the page in browser. Thanks.
Bojan Krstevski (1 year ago)
you can use &emsp; for 4 spaces at once
FUN WAY (1 year ago)
you are the best teacher.
shekhar singh (1 year ago)
dont save as,just press ctrl+s
CHUNXIAN ZHANG (1 year ago)
hi,very good explainations,thank you very much !!
Luqman Mohamed (1 year ago)
you are a very great teacher, your explanation is very understandable and most of all you are not boring..
Zidane Khan (1 year ago)
Melanie Unwin (1 year ago)
Awesome! So what if I want to make a website that's not about fish?
Asante J. (1 year ago)
you are a very great teacher, your explanation is very understandable and most of all you are not boring.. 5 stars :-) lol
Anya K (1 year ago)
Thank you. You're an amazing teacher. I'm just starting out and you made it so incredibly accessible and easy to understand.
EJ Media (1 year ago)
Thank you
frootube (1 year ago)
What keyboard?
Yue Hern (1 year ago)
Amazing video ! Really great explanation. Good job !!!
Andrei Andrei (1 year ago)
thanks man
Volantes (1 year ago)
Is it the same with Mac?
Mallu K (1 year ago)
https://support.apple.com/en-us/HT201236 MAC shortcuts page.
HTML_exe (1 year ago)
yeah lmao
G.V. Maheshwari (1 year ago)
what is nbsp? can u pls elaborate?
Ethereal Huldra (1 year ago)
nbsp stands for Non-Breaking SPace (spaces that don't create a new line). He should have put it in the video
toon zoon (1 year ago)
good job
FoxChu McCray (1 year ago)
you don't have to hit save as every time.
Briap Deum (3 months ago)
No Hate, But thats kinda annoying.
Mirn Ish (6 months ago)
And indeed he is a pretty good teacher
Mirn Ish (6 months ago)
Hahah i died inside everytime he did that
ScreeZ (1 year ago)
not for me lol
BLACKROOSTER125 (1 year ago)
you can actually just type in the code in notepad and not save it head over to the website and just refresh it.
jesson pulutan (1 year ago)
Wandering Recluse (4 months ago)
The name of the filename doesn't really matter. So test.html or text.html will work exactly the same.
priyanshu mishra (1 year ago)
you are the best coding teacher in the world !
Omar Tagle (1 year ago)
You are the greatest!
Joss Maynor (1 year ago)
can you line break in the middle of text in the paragraph tag? if so what would the code look like?
Beyond Infinity (1 year ago)
<h2> This is a section on bass fish. </h2> <br> <br> <br> <p> Bass fish live in lakes. </p> imagine the <br> wasn't there cause it was opened on a website
Ceilvia C (1 year ago)
I like that your tutorials are short and straight to the point. That's just awesome
Andres Perilla (2 years ago)
man, best teacher around the coding world. Why cant ppl explain stuff like this in the same way.
KSV Krishnan (1 year ago)
neeharts (1 year ago)
agree with you,totally
n/a n/a (1 year ago)
David Devora (2 years ago)
i used the <br> tag saved to .html and nothing changed. can you help me please
HTML_exe (1 year ago)
check for bugs
Kelsey W (1 year ago)
Where exactly did you insert the <br> tag?
SUJOY BISWAS (2 years ago)
Thank you sir
Aman Sharma (2 years ago)
This is second video ( HTML Tutorial for Beginners - 02 - Line breaks, spacing, and comments) and first video was introduction to html. I dint find CREATING A WEB PAGE, which is refereed in this video kindly provide link for this video. PS: You are great teaches,thanks for lessons.!
religion of peace (2 years ago)
You have tutorial to connect php to html ??
Igor Semenuk (2 years ago)
It is very scholarly! Thank you.
Ariel JJ (2 years ago)
So <br> is for creating vertical spaces and &nbsp is for creating horizontal spaces between text. I just assumed that we could've done test <b> test, and tat would've created the space. & Thank you so much for these tutorials, you are amazing.
Beyond Infinity (1 year ago)
you know that <br> and <b> are different commands right. And yes we could've done. test <br> <br> test it would look like this. it would still create a vertical line break test test
Kelsey W (1 year ago)
<b>, iirc just bolds the following text. It's been years since I screwed with html, though, so I may be wrong.
Childish Vazhino (2 years ago)
Why we should ouse <p> </p> tags when we already are using <h1> </h1> tags? its already creating empty spaces
Wandering Recluse (4 months ago)
Heading tags like <h1> is used in search engines to filter for sites with those headings or section and show parts of the website.
DaVid ROOT (2 years ago)
<h1> </h1> are for giving Headings..whereas <p> </p> are for paragraphs
peerapol thebank (2 years ago)
i watch your video and it is very great do you write books or article in pdf. because i live in thailand south east asia there are very few guides so could you suggest a name of books that i could read futher for advance-----expert in HTML5 and I plan to learn javascript from you to I will watch your video for basic guide thank you very much your video very great!!
Kelly Cover (1 year ago)
yeah i go there too
Admin-i strator (2 years ago)
Everything is in internet for free just look from right places.
Echcho Ahmed (2 years ago)
thank you it's helpful
EJ Media (2 years ago)
http://www.w3schools.com/ is a great website for further studies
Evil Friends (2 years ago)
I have a crush on this guy
dawson moh (10 months ago)
Glory Fk (2 years ago)
lol u should ask him out
sunil kumar (2 years ago)
Very wonder full effort........carry on
Thankes EJ Media Thankes Alot You helped me to start html
Robert Reimann (2 years ago)
Thank you!!! I finally found them! The best HTML tutorials there are on YouTube. I'll watch all your HTML, CSS and JavaScript tutorials and LIKE all of them... You got a sub man :D
Magic hacker (11 months ago)
i did thet too
Stephen (2 years ago)
I adore your videos. You really helped me with my Java programming, and now I am starting to learn web technologies with the help of your videos!
Stephen (2 years ago)
+EJ Media I bet! Keep going!
EJ Media (2 years ago)
+Stephen Thank you for the nice words - they were a lot of work
Dark Pheonix (2 years ago)
I was writing notes for myself to remember all this stuff and I wrote down how to write a comment (so basically a comment within a comment). The problem is that comment shows up on the screen. Is there some sort of escape character to hide this? Here is the comment: <!--[<!-- -->: a comment, this is for your ease, the user will not see this]-->
EJ Media (2 years ago)
+Dark Pheonix Ya i didnt think it would work but nice workaround
Dark Pheonix (2 years ago)
+Dark Pheonix Okay did a google search and found out that nested comments aren't possible. A solution they gave was instead of ending it with --> replace it with - -> pretty much add a space. Worked for me.
EJ Media (2 years ago)
+Dark Pheonix Yes I actually did a video on escape characters but i dont think i ever tried to escape a comment in a comment
Dark Pheonix (2 years ago)
+EJ Media In python backslash is an escape character(basically asks the compiler to ignore the next thing) is there something like that for HTML?
EJ Media (2 years ago)
+Dark Pheonix Oh wow I have never even tried that. I am not sure it's possible to do that
Sloan Porter (3 years ago)
I'm wondering why the words "test test" don't need to be between the <p> </p> tags.. ?
Sloan Porter (3 years ago)
Got it!! Thanks :D
EJ Media (3 years ago)
+Sloan Porter Theres no requirement to place text between tags except it has to be between the body tags
Juan Luis Fernández (3 years ago)
Excellent job, EJ. Thanks.Can you or someone in the audience recommend a free text editor for the Mac? What's the best and easiest to use for a rookie?
James Smith (2 years ago)
+Juan Luis Fernández Adobe 'brackets!' Just got it, it is incredible. You can live preview your code, you no longer have to continuously refresh!
EJ Media (3 years ago)
+Juan Luis Fernández The only one I have heard of is TextWrangler but I have never used it
Philodox Xiph (3 years ago)
Dude your awesome

Would you like to comment?

Join YouTube for a free account, or sign in if you are already a member.