HTML Introduction to HTML and CSS Getting Familiar with HTML and CSS Building Web Pages with HTML and CSS

How to find which line the code is on (3mins into the video) referring to finding the image in HTML

About 3 mins in the video she says lets find the code in HTML am new to coding and its my first day, sorry if my question dose not make sense or is stupid, all i see so many lines of code and its kind of confusing to search for something when you dont know what it should say. Can any one help me on how to locate which line the code is on when am searching for it either on the html or css window. Thanks in advance.

4 Answers

Alexander Solberg
Alexander Solberg
14,349 Points

Im a little bit confused by the question, but . . . In the video she is looking for a piece of information attached to an html-element called a "class". She uses this information to locate it in the the styles.css file, where all the styling of html-elements are applied.

in styles.css the code is located at line 65, the hover effect at line 73.

in the html, or index.html, the reference or "class" can be found on line 24.

You can search through your files in the workspace by pressing ctrl+f on windows and I think cmd+f on mac. A search field appears, you can type in what you are looking for.

Prince Canty
Prince Canty
2,135 Points

If I understand your question correctly you are ask how do you know where to look to change hat piece of code. In this particular case shes refering to an image located in the header. Since what you want to change about it is style related you will have to find it in css. If you look at the link where you add the picture you will see a class= "profile-image" .profile-image is the section in the css document you would have to find to change.

Adam Beer
Adam Beer
11,266 Points

Just look at the left side, there are the row numbers. But Treasure used the <img> tag specific class property and selected the element. Inside the css file use this. For example.

.profile-image{
   //your css code
}

Code

Wrap your code with 3 backticks (```) on the line before and after. If you specify the language after the first set of backticks, that'll help us with syntax highlighting.

      ```html
      <p>This is code!</p>
      ```

You can use the snapshot function in the workspace and provide the link to that.

Please check these courses. HTML Basics and CSS Basics. Then you will know the HTML and CSS basics. Hope this help.

Thank you all for your Help