Wie zur Ausgabe von HTML in php include:
<?php
echo "<p class='myTest' id='myTag'>This is some text within HTML-tags</p>";
// Notice the use of "" and '', you do not wanna close the echo adding a class or such
?>
und wie für die CSS, startet, indem Sie ein Stylesheet in Ihrer HTML-Datei einschließlich (im <head>
Tag):
<link rel="stylesheet" type="text/css" href="myStyle.css">
und in myStyle.c ss, Ihre HTML-Stil:
p.myTest {
color: red;
/* All <p> tags content with the class myTest will be written in red */
}
Wenn Sie Ihr Styling wünschen Tag spezifisch sein:
p {
color: red;
/* All <p> tags content will be written in red */
}
Oder vielleicht möchten Sie es stattdessen auf eine eindeutige ID angewendet werden:
#myTag {
color: red;
/* The content of the tag with the id "myTag" will be colored red,
given that color is a valid property for that specific tag */
}
Es gibt viele basic styling Tutorials und führt dort zu helfen Ihnen die ersten Schritte, dass navbar Styling.
Mögliches Duplikat von [Wie schreibe ich HTML-Code innerhalb ] (http://StackOverflow.com/Questions/18140270/How-to-Write-HTML-Code-inside-PHP) –