![]() ![]() Let’s do that: Īfter all the battles we fought together, after all the difficult times we saw together, after all the good and bad moments we've been through, I think it's time I let you know how I feel about you. Right now we want to set the width to 550px. You see that empty ""? That’s where we will define the looks of the element. The following line will create an empty style attribute on a “p” element. You can define an element’s style (for example, width in our case), inside its style attribute. We can do that by using the element’s “style” attribute. Let’s give a width of, say, 550px to our paragraph. You will see that the text covers the entire width of the screen. The text inside the opening and closing tag of an element is that element’s content. Let’s get some of the terminologies out of the way first: is the opening tag, is the closing tag, and “p” is the tag name. A web page is collection of HTML elements. Let’s do this: After all the battles we fought together, after all the difficult times we saw together, after all the good and bad moments we've been through, I think it's time I let you know how I feel about you.īy writing the paragraph inside and you created an HTML element. If you wrap the text with and, then the browser will know that the text inside the and is a paragraph. We have a specific way to let the browser know that a text is a paragraph. Our first paragraph is ready, but this is not the recommended way of writing a paragraph in HTML. If it’s already open, click refresh on your browser. Enable word wrap by clicking View -> Toggle Word Wrap (alt+z). “After all the battles we fought together, after all the difficult times we saw together, and after all the good and bad moments we’ve been through, I think it’s time I let you know how I feel about you.”Ĭopy the paragraph in your loveletter.html in VS Code. We have our blank HTML file, so here’s the first paragraph Batman wants to write in his love letter And as we use Image Viewer to view the images, we use the Browser to view our HTML pages. As we use Paint to create and edit images, we use VS Code to create and edit our HTML files. Then if you want to edit that image again, you re-open it in Paint, edit it, and save it. ![]() You draw something in Paint and save it as an image and then you can view that image in Image Viewer. Remember the first time you got your hands on a computer? The first thing I did was open MS Paint and draw something. Let’s relate this process to something we are already familiar with. I recommend using Firefox for web development, but Chrome is fine too. Now, if you open this file by double-clicking it from your file explorer, it will open in your default browser. Navigate to the “Batman’s Love Letter” folder and name the file “loveletter.html” and click save. Open VS Code and press ctrl+n to create a new file and ctrl+s to save the file. That means that all our files related to this project will live here. ![]() Inside this directory, create one more directory called “Batman’s Love Letter” (without quotes). It’s free, and the only Microsoft Product I love.Ĭreate a directory in your system and name it “HTML Practice” (without quotes). You can do this in Notepad, or any other basic editor, but I would recommend using VS Code instead. Your first HTML fileĪn HTML webpage is like other files on your computer. Who could refuse a request from Batman, right? Let’s write Batman’s love letter in HTML. I need to write my love letter in HTML - would you do it for me?” I am a super geek, but I don’t know HTML. In the bathroom, while wondering why this is happening to you, you hear a heavy voice from the vent: “Hey, I am Batman.”īefore you panic and stand up in middle of the critical process, Batman says, “I need your help. One fine night, your stomach refuses to digest the large Pizza you had at dinner, and you have to rush to the bathroom in the middle of your sleep. By Kunal For your first HTML code, let’s help Batman write a love letter Image Credit
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |