Basic doubt


#1

<!DOCTYPE html>
<html>
Hi bubby
<strong> Hello Genius strong> </strong> 
</html>

#2

Hey,

What is your question?


#3

for next time, use one of the two following options to make your code/indent is visible:

select your code and press ctrl + shift + c (or cmd + shift + c if you use a mac)

if this instructions are unclear, you can also insert 3 backticks before and after your code, like so:

```
<p>visible</p>
```

the backtick is located above the tab key on your keyboard

Now, like zainabrawat says, what is your question?


#4

Hey thanks for your reply,
if i compile above code, the output is "Hello Genius strong>
but if i place less than sign(<) at front of strong like this "<-strong" output is "Hello Genius"

why its not compiling "< strong" in output?


#6

remove this part

and you should be left with
<strong> Hello Genius </strong>


#7

my question is not in code but if i compile with less than sign its not providing output but if i compile with greater than sign its compiled.

Such that "< strong" its does not shows in output. (without spaces in between < and strong)
but if "strong>", it shows in output

why this differences,


#8

You open tags like this

<head> you close tags like </head> . strong> displays because it hasn't got an opening tag to it.
Where as <head wont display because thats how you open a tag normally.

<html
html>

But all tags should open like <h1> and end like </h1>


#9

so html follows through open tag and if we put open tag its considering as code.

If we really needed to insert like "< strong"(without spaces) how to do it?


#10

Why do you need to have a < before it? could you not just write strong? if you don't want it to be read as code.

You could do something like this but I would NOT reccomend it ever.

<strong> <strong Hello Genius strong </strong>

#11

:slightly_smiling: okay