+ 1

Printing tags in html

What if I wanted to print a tad in html for example say i wanted to teach someone how to use a specific tag like<html> How do you do that?

30th Apr 2019, 2:05 PM
Pikachu
Pikachu - avatar
4 Antworten
+ 4
you can write &lt; and &gt; for < and >. So <html> will be written as &lt;html&gt;
30th Apr 2019, 2:10 PM
Rfs
Rfs - avatar
+ 2
cristalLysard you can't use PHP in HTML, you have to have special compiler and file must have .php type.
30th Apr 2019, 4:48 PM
Maneren
Maneren - avatar
+ 1
It's kind of stretch, but you could use php: <?php echo("<html>"); ?> This would work with js as well
30th Apr 2019, 2:14 PM
cristalLysard
cristalLysard - avatar
0
Yeah you're right, I'm too used to just save webpages as .php files to include headers... sorry about that 😅
30th Apr 2019, 7:48 PM
cristalLysard
cristalLysard - avatar