为什么我在<!DOCTYPE html>
<!DOCTYPE html>
<html>
<head>
<title>Portfolio</title>
<link rel="stylesheet" type="text/css" href="shapes.css">
</head>
<body>
<div class="content">
<div class="header">
</div>
<div class="middle">
<div class="image">
</div>
<div class="text">
</div>
</div>
</div>
</body>
</html>
语法错误
File "/Volumes/postergren_projectDrive/Projekt/programmingSandbox/Udacity/Intro to HTML and CSS/startBlock/portfolio/toplist/index.html", line 1
<!DOCTYPE html>
^
SyntaxError: invalid syntax
[Finished in 0.0s with exit code 1]
[shell_cmd: "python" -u "/Volumes/postergren_projectDrive/Projekt/programmingSandbox/Udacity/Intro to HTML and CSS/startBlock/portfolio/toplist/index.html"]
[dir: /Volumes/postergren_projectDrive/Projekt/programmingSandbox/Udacity/Intro to HTML and CSS/startBlock/portfolio/toplist]
[path: /usr/bin:/bin:/usr/sbin:/sbin]
答案 0 :(得分:1)
您无法直接从Python输出HTML。您需要使用print
或更好的,某种模板库。
答案 1 :(得分:1)
在我意识到它的第一个评论之后,这是一个简单的解决方案。
这只是一个人为错误,忘了将我的构建系统设置为sublime而不是anaconda(python)。
谢谢..